Stelian Pop <stel...@popies.net> writes:

> on TARGET_8W and TARGET_16:
> 920928-1.c:
>       1 struct{int c;}v;
>       2 static long i=((char*)&(v.c)-(char*)&v)
> 930326-1.c:
>       1 struct
>       2 {
>       3   char a, b, f[3];
>       4 } s;
>       5
>       6 long i = s.f-&s.b;
> labels-3.c:
>        9 int foo (int a)
>       10 {
>       11   static const short ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
>       12   void *p = &&l1 + ar[a];
>       13   goto *p;
>       14  l1:
>       15   return 1;
>       16  l2:
>       17   return 2;
>       18 }
>
> on TARGET_16W and TARGET_32: 20011114-1.c:
>       1 extern void _text;
>       2 static __SIZE_TYPE__ x = (__SIZE_TYPE__) &_text - 0x10000000L - 1;
>
> Are those tests expected to fail on my port or is that something I've
> obviously done wrong ?

I don't see any particular reason that these tests should fail.  I
hasten to add that these tests are not very important and it is unlikely
that a failure to pass these tests will affect any actual program.

You didn't mention which version of gcc you are based on.  Do you have
these patches?  If not, that may be your problem.

2008-09-04  Ian Lance Taylor  <i...@google.com>

        * varasm.c (narrowing_initializer_constant_valid_p): New
        static function.
        (initializer_constant_valid_p): Call it.

2008-09-19  Ian Lance Taylor  <i...@google.com>

        * varasm.c (narrowing_initializer_constant_valid_p): Return
        NULL_TREE if ENDTYPE is not an integer.


Even if you do have those patches, that code is where I would start
looking.  Your initializers are constant, but something in that area
thinks that they are not constant.

Ian

Reply via email to