Ada and ARM build assertion failure

2005-03-20 Thread Nick Burrett
I've been having some difficulty building Ada as a native compiler for 
an ARM-based target that I'm working on.  The error is:

../../xgcc -B../../ -c -g -O2  -W -Wall -gnatpg -g -O1 -fno-inline \
   a-except.adb -o a-except.o
| 4.0.0 20050318 (prerelease) (arm-riscos-elf) Assert_Failure 
nlists.adb:296|
| Error detected at a-exexpr.adb:85:9

This seems to be a reoccurance of PR5677.
As I'm using a modified backend, I wanted to know whether other users 
are having this problem when building Ada for ARM targets.

The only patch I apply to Ada is below.
Any thoughts before I go barking up the wrong tree ?
Regards,
Nick.

diff -x '*.orig' -x '*.rej' -uprN 
/home/nick/riscos-aof/masters/gcc-4.0/gcc/ada/s-auxdec.ads 
gcc-4.0/gcc/ada/s-auxdec.ads
--- /home/nick/riscos-aof/masters/gcc-4.0/gcc/ada/s-auxdec.ads 
2004-06-16 14:50:06.0 +0100
+++ gcc-4.0/gcc/ada/s-auxdec.ads2005-03-18 11:30:24.0 +
@@ -283,7 +283,7 @@ pragma Elaborate_Body (Aux_DEC);
end record;

for Aligned_Word'Alignment use
- Integer'Min (2, Standard'Maximum_Alignment);
+ Integer'Min (4, Standard'Maximum_Alignment);
procedure Clear_Interlocked
  (Bit  : in out Boolean;


Re: Ada and ARM build assertion failure

2005-03-21 Thread Nick Burrett
Geert Bosch wrote:
On Mar 21, 2005, at 02:54, Nick Burrett wrote:
This seems to be a reoccurance of PR5677.

I'm sorry, but I can't see any way this is related, could you elaborate?
Sorry, I completely misread the PR.  It is not related.
for Aligned_Word'Alignment use
- Integer'Min (2, Standard'Maximum_Alignment);
+ Integer'Min (4, Standard'Maximum_Alignment);

This patch is wrong, as it implicitly increases the size of Aligned_Word 
from
2 to 4 bytes: size is always a multiple of the alignment.
OK, but if I don't apply the patch, GNAT complains that the alignment 
should be 4, not 2 and compiling ceases.

However, it is really dubious you need to change this package, as it is 
only
used for DEC Ada compatibility on VMS systems.
OK, but all systems build it, as it is unconditionally defined in 
Makefile.rtl::GNATRTL_NONTASKING_OBJS

And here it exists in a i686-linux build:
[EMAIL PROTECTED] rts]$ ls -l s-aux*
lrwxrwxrwx  1 nick nick50 Mar 18 12:51 s-auxdec.adb -> 
/home/nick/riscos-elf/gcc-4.0/gcc/ada/s-auxdec.adb
lrwxrwxrwx  1 nick nick50 Mar 18 12:51 s-auxdec.ads -> 
/home/nick/riscos-elf/gcc-4.0/gcc/ada/s-auxdec.ads
-r--r--r--  1 nick nick 19835 Mar 18 12:57 s-auxdec.ali
-rw-rw-r--  1 nick nick 32908 Mar 18 12:57 s-auxdec.o
[EMAIL PROTECTED] rts]$

Nick.


tree-ssa-address ICE

2005-06-08 Thread Nick Burrett

The inclusion of this patch:

2005-06-07  Zdenek Dvorak  <[EMAIL PROTECTED]>

* tree-ssa-address.c: New file.
* Makefile.in (tree-ssa-address.o): Add.
* expr.c (expand_expr_real_1): Do not handle REF_ORIGINAL on
INDIRECT_REFs.  Handle TARGET_MEM_REFs.
...

causes an ICE when compiling the following code for the ARM/Thumb 
instruction set:


int
foo (char *s1, char *s2, int size)
{
  while (size > 0)
{
  char c1 = *s1++, c2 = *s2++;
  if (c1 != c2)
return c1 - c2;
  size--;
}
  return 0;
}

$ ../configure --target=arm-elf-linux --enable-languages=c
$ ./cc1 -quiet test.c -mthumb -O2
../../bug.c: In function ‘foo’:
../../bug.c:3: internal compiler error: in create_mem_ref, at 
tree-ssa-address.c:585

Please submit a full bug report,

Nick.