Software Archive
Read-only legacy content
17061 Discussions

internal error 0_381 ??

Felix_Singer
Beginner
679 Views
(0): internal error: 0_381

compilation aborted for x1.cpp (code 4)


Has anyone encountered this error
What does it mean?

0 Kudos
3 Replies
Felix_Singer
Beginner
679 Views
In case anyone interested, it was an issues with optimization. If you set -O1 or -O0 it "fixes" it. bummer
0 Kudos
Brandon_H_Intel
Employee
679 Views
Hi Felix,

I have a report internally on a similar internal error which is instigated by optimizations. That should get resolved in a 12.1 update (i.e. C++ Composer XE 2011 future update). However, that's just speculation on my part unless you can send us a preprocessed version of your source file (using -P) along with the compiler options you used. Our Premer Support web site which you should have an account on for free if you have registered your software provides a convenient way for attaching files securely, so please do so if you're interested in following up. Thanks!
0 Kudos
Sebastian_Freundt
679 Views
I've got an example that triggers it, in a nutshell perform the same assignment twice but differently: #include <stdio.h> #include <string.h> struct test_s { int foo; }; static void copy_using_memcpy(struct test_s *pto, struct test_s *pfrom) { memcpy(pto, pfrom, sizeof(struct test_s)); return; } static void copy_using_deref(struct test_s *pto, struct test_s *pfrom) { *pto = *pfrom; return; } int main(int argc, char *argv[]) { struct test_s a = {1}; struct test_s b = {0}; /* do the same assignment twice */ copy_using_deref(&b, &a); copy_using_memcpy(&b, &a); /* prevent being optimised away */ return b.foo == a.foo; }
0 Kudos
Reply