http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50802

--- Comment #15 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 
2011-11-18 22:15:29 UTC ---
Created attachment 25855
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25855
Preprocessed testcase for epiphany

I can't reproduce the test on gcc20, I think this is a 32 vs. 64 bit
build and/or host machine issue.

I can reproduce the problem on a 32 bit system:
Linux purzah 3.1.1-1.fc16.i686.PAE #1 SMP Fri Nov 11 22:04:40 UTC 2011 i686
i686 i386 GNU/Linux

I have used trunk revision 181442 .

configured for --target=epiphany-elf .

You don't need Epiphany for this, you can just make "all-gcc", and when
it has configured the gcc build directory, you can stop the build, cd to the
gcc build directory, and build just cc1.

compile the preprocessed sources with:

./cc1 -O2 -dumpbase arith-rand-ll.c arith-rand-ll.i -o arith-rand-ll.s
-fdump-tree-all

in arith-rand-ll.c.080t.dom1, you can see in line 543
  r2_98 = (signed char) D.2263_64

earlier, the same ssa variable has been used in
  r2_65 = (short int) D.2263_64;

both uses are, in fact, incorrect, because D.2263_64 is calculated as 32
bit signed modulo of 32 bit x and y.

Reply via email to