Message ID | 20120530132129.CFD663BE18@mailhost.lps.ens.fr |
---|---|
State | New |
Headers | show |
On Wed, May 30, 2012 at 03:21:28PM +0200, Dominique Dhumieres wrote: > I get an ICE of the form > > /opt/gcc/work/gcc/testsuite/gcc.target/powerpc/savres.c: In function 'nb_all': > /opt/gcc/work/gcc/testsuite/gcc.target/powerpc/savres.c:473:3: internal compiler error: in rs6000_emit_prologue, at config/rs6000/rs6000.c:19850 > > Is the test intended to work on PIC targets? No, but see rs6000/darwin.h CC1_SPEC. "-static" makes you non-PIC. I've just built a darwin cc1 to reproduce the problem. The ICE is on START_USE (ptr_regno); when setting up a reg to use for altivec saves. The reg clashes with the static chain pointer (nb_all is a nested function), so this is a real bug that the register checks have uncovered. I haven't determined whether this is a new bug introduced with my prologue changes, or whether it's a long-standing bug. I suspect the latter.
On Thu, May 31, 2012 at 09:43:09AM +0930, Alan Modra wrote: > real bug that the register checks have uncovered. I haven't > determined whether this is a new bug introduced with my prologue > changes, or whether it's a long-standing bug. I suspect the latter. Looks like it is one I introduced. gcc-4.6 uses r12 to save altivec regs, my new code tries to use r11. Will fix.
--- /opt/gcc/_gcc_clean/gcc/testsuite/gcc.target/powerpc/savres.c 2012-05-02 14:25:40.000000000 +0200 +++ /opt/gcc/work/gcc/testsuite/gcc.target/powerpc/savres.c 2012-05-30 13:45:15.000000000 +0200 @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-fno-inline -fomit-frame-pointer" } */ +/* { dg-options "-fno-inline -fomit-frame-pointer -static" } */ /* -fno-inline -maltivec -m32/-m64 -mmultiple/no-multiple -Os/-O2. */ #ifndef NO_BODY