This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.3 branch] IA64 bootstrap failure


On Wed, Jul 09, 2003 at 08:24:53AM -0700, H. J. Lu wrote:
> On Tue, Jul 08, 2003 at 03:53:38PM -0700, Jim Wilson wrote:
> > Andreas Schwab wrote:
> > >Running the same (stage2) compiler command on the command line produces
> > >output that is the same as the output from the stage1 compiler.  So it
> > >indeed looks like it's dependent on the environment size.
> > 
> > I've debugged problems like this before.  You vary the environment size 
> > until you can reproduce the problem, and then you debug two compilers in 
> > parallel with different environment sizes until you figure out why they 
> > emit different code.  Probably an uninitialized variable or a 
> > stray/out-of-bounds memory reference somewhere.  Another possibly is 
> > that addresses are being used (e.g. in a hash table) and there is a 
> > latent bug in the code.
> > 
> 
> A few things I noticed:
> 
> 1. It doesn't happen with -da.
> 2. It doesn't happen with debug is off.
> 3. It doesn't happen with preprocessed input.
> 3. It is very sensitive to input. Removing a few lines or adding
> "#if 0/#endif" will make it to go away.
> 
> I have been working on Intel IA64 intrinsics. Since the compiler is not
> miscompiled, I will go back to take another look after I finish my
> intrinsics work.

I believe it must be scheduler.
I've managed to reproduce it on gcc-3_3-rhl-branch, with:
-quiet -v -I. -Ijava -I../../gcc -I../../gcc/java -I../../gcc/config -I../../gcc/../include -iprefix stage2/../lib/gcc-lib/ia64-redhat-linux/3.3/ -isystem include -isystem stage2/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -DIN_GCC -DHAVE_CONFIG_H ../../gcc/java/decl.c -quiet -dumpbase decl.c -auxbase-strip java/decl.s5 -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -version -o java/decl.s
I get different output (the 2 swapped insns posted before by Andreas) than with:
-quiet -v -I. -Ijava -I../../gcc -I../../gcc/java -I../../gcc/config -I../../gcc/../include -iprefix stage2/../lib/gcc-lib/ia64-redhat-linux/3.3/ -isystem include -isystem stage2/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -DIN_GCC -DHAVE_CONFIG_H ../../gcc/java/decl.c -quiet -dumpbase decl.c -auxbase-strip java/decl.s5 -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -version -o java/decl.s -dM
which definitely should not change single iota.
print_rtl(stderr, get_insns()) is identical right before
      schedule_ebbs (rtl_dump_file);
in ia64_reorg (for function java_init_decl_processing),
while immediately after it I get following difference:

@@ -37524,32 +37480,32 @@ Breakpoint 4, ia64_reorg (insns=0x200000
         ] 2) -1 (nil)
     (nil))

-(insn 12204 12203 3309 0 (nil) (unspec [
+(insn 12204 12203 3305 0 (nil) (unspec [
             (const_int 8 [0x8])
         ] 23) -1 (nil)
     (nil))

-(insn:TI 3309 12204 12205 0 0x2000000000dfe160 (cond_exec (ne (reg:BI 262 p6 [1716])
+(insn:TI 3305 12204 12205 0 0x2000000000dfe160 (cond_exec (eq (reg:BI 262 p6 [1716])
             (const_int 0 [0x0]))
-        (set (mem/s:DI (reg/v/f:DI 112 r32 [341]) [0 <variable>.common.chain+0 S8 A64])
-            (reg/v/f:DI 8 r8 [1696]))) 424 {mf+7} (insn_list 3297 (insn_list 3255 (insn_list 10859 (insn_list:REG_DEP_ANTI 3293 (insn_list:REG_DEP_ANTI 3296 (nil))))))
-    (expr_list:REG_DEAD (reg/v/f:DI 112 r32 [341])
-        (expr_list:REG_DEAD (reg:BI 262 p6 [1716])
-            (nil))))
+        (set (mem/s:DI (reg/f:DI 15 r15 [1714]) [0 <variable>.type.values+0 S8 A64])
+            (reg/v/f:DI 8 r8 [1696]))) 424 {mf+7} (insn_list 3297 (insn_list 3295 (insn_list 10859 (insn_list:REG_DEP_ANTI 3293 (insn_list:REG_DEP_ANTI 3296 (nil))))))
+    (expr_list:REG_DEAD (reg/f:DI 15 r15 [1714])
+        (nil)))

-(insn 12205 3309 3305 0 (nil) (unspec [
+(insn 12205 3305 3309 0 (nil) (unspec [
             (const_int 0 [0x0])
         ] 23) -1 (nil)
     (nil))

-(insn 3305 12205 3312 0 0x2000000000dfe160 (cond_exec (eq (reg:BI 262 p6 [1716])
+(insn 3309 12205 3312 0 0x2000000000dfe160 (cond_exec (ne (reg:BI 262 p6 [1716])
             (const_int 0 [0x0]))
-        (set (mem/s:DI (reg/f:DI 15 r15 [1714]) [0 <variable>.type.values+0 S8 A64])
-            (reg/v/f:DI 8 r8 [1696]))) 424 {mf+7} (insn_list 3297 (insn_list 3295 (insn_list 10859 (insn_list:REG_DEP_ANTI 3293 (insn_list:REG_DEP_ANTI 3296 (nil))))))
-    (expr_list:REG_DEAD (reg/f:DI 15 r15 [1714])
-        (nil)))
+        (set (mem/s:DI (reg/v/f:DI 112 r32 [341]) [0 <variable>.common.chain+0 S8 A64])
+            (reg/v/f:DI 8 r8 [1696]))) 424 {mf+7} (insn_list 3297 (insn_list 3255 (insn_list 10859 (insn_list:REG_DEP_ANTI 3293 (insn_list:REG_DEP_ANTI 3296 (nil))))))
+    (expr_list:REG_DEAD (reg/v/f:DI 112 r32 [341])
+        (expr_list:REG_DEAD (reg:BI 262 p6 [1716])
+            (nil))))

-(insn 3312 3305 3324 0 0x2000000000dfe160 (set (reg/f:DI 15 r15 [1724])
+(insn 3312 3309 3324 0 0x2000000000dfe160 (set (reg/f:DI 15 r15 [1724])
         (plus:DI (reg/v/f:DI 8 r8 [1696])
             (const_int 88 [0x58]))) 101 {adddi3} (insn_list:REG_DEP_ANTI 3296 (insn_list:REG_DEP_ANTI 3305 (insn_list:REG_DEP_OUTPUT 3295 (insn_list 10859 (nil)))))
     (nil))
@@ -37633,14 +37589,14 @@ Breakpoint 4, ia64_reorg (insns=0x200000
 (note 3326 12212 3338 0 ("../../gcc/java/decl.c") 645)

 (insn 3338 3326 10835 0 0x2000000000dff480 (set (reg:DI 120 r115)
-        (mem:DI (reg/f:DI 32 r35 [1727]) [3 java_global_trees+712 S8 A64])) 7 {*movdi_internal} (insn_list:REG_DEP_OUTPUT 3284
(insn_list 3315 (insn_list:REG_DEP_ANTI 10859 (insn_list 3309 (insn_list 3317 (insn_list 3323 (nil)))))))
+        (mem:DI (reg/f:DI 32 r35 [1727]) [3 java_global_trees+712 S8 A64])) 7 {*movdi_internal} (insn_list:REG_DEP_OUTPUT 3284
(insn_list 3315 (insn_list:REG_DEP_ANTI 10859 (insn_list 3305 (insn_list 3309 (insn_list 3317 (insn_list 3323 (nil))))))))
     (nil))

 (call_insn 10835 3338 12213 0 0x2000000000dff480 (parallel [
             (call (mem:DI (symbol_ref/v:DI ("layout_type")) [0 S8 A64])
                 (const_int 0 [0x0]))
             (clobber (reg:DI 320 b0))
-        ]) 223 {call_nogp} (insn_list:REG_DEP_ANTI 3293 (insn_list:REG_DEP_ANTI 3296 (insn_list:REG_DEP_ANTI 3316 (insn_list:REG_DEP_OUTPUT 3297 (insn_list:REG_DEP_OUTPUT 10883 (insn_list:REG_DEP_OUTPUT 3286 (insn_list:REG_DEP_OUTPUT 3280 (insn_list:REG_DEP_OUTPUT 10901 (insn_list:REG_DEP_ANTI 3320 (insn_list:REG_DEP_OUTPUT 10396 (insn_list:REG_DEP_ANTI 3322 (insn_list:REG_DEP_ANTI 3305 (insn_list:REG_DEP_ANTI 3319 (insn_list:REG_DEP_ANTI 3312 (insn_list:REG_DEP_ANTI 3324 (insn_list:REG_DEP_OUTPUT 11260 (insn_list 3338 (insn_list 10860 (insn_list 11264 (insn_list:REG_DEP_ANTI 10859 (insn_list 3309 (insn_list 3317 (insn_list 3323 (nil))))))))))))))))))))))))
+        ]) 223 {call_nogp} (insn_list:REG_DEP_ANTI 3293 (insn_list:REG_DEP_ANTI 3296 (insn_list:REG_DEP_ANTI 3316 (insn_list:REG_DEP_OUTPUT 3297 (insn_list:REG_DEP_OUTPUT 10883 (insn_list:REG_DEP_OUTPUT 3286 (insn_list:REG_DEP_OUTPUT 3280 (insn_list:REG_DEP_OUTPUT 10901 (insn_list:REG_DEP_ANTI 3320 (insn_list:REG_DEP_OUTPUT 10396 (insn_list:REG_DEP_ANTI 3322 (insn_list:REG_DEP_ANTI 3319 (insn_list:REG_DEP_ANTI 3312 (insn_list:REG_DEP_ANTI 3324 (insn_list:REG_DEP_OUTPUT 11260 (insn_list 3338 (insn_list 10860 (insn_list 11264 (insn_list:REG_DEP_ANTI 10859 (insn_list 3305 (insn_list 3309 (insn_list 3317 (insn_list 3323 (nil))))))))))))))))))))))))
     (expr_list:REG_DEAD (reg:DI 120 r115)
         (expr_list:REG_DEAD (reg:DI 1 r1)
             (expr_list:REG_UNUSED (reg:DI 320 b0)


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]