internal error 0_381 ??

internal error 0_381 ??

(0): internal error: 0_381

compilation aborted for x1.cpp (code 4)

Has anyone encountered this error
What does it mean?

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

In case anyone interested, it was an issues with optimization. If you set -O1 or -O0 it "fixes" it. bummer

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!

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));

static void
copy_using_deref(struct test_s *pto, struct test_s *pfrom)
*pto = *pfrom;

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 ==;

Leave a Comment

Please sign in to add a comment. Not a member? Join today