[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-29 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

--- Comment #11 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-29 
08:12:15 UTC ---
Author: jakub
Date: Wed Feb 29 08:12:04 2012
New Revision: 184652

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=184652
Log:
PR bootstrap/52397
* df.h (struct df_d): Adjust comment that hard_regs_live_count
doesn't count DEBUG_INSN refs.
* df-scan.c (df_ref_create_structure): Don't set DF_HARD_REG_LIVE
for DEBUG_INSN refs.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/df-scan.c
trunk/gcc/df.h


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-29 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #12 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-29 
08:15:56 UTC ---
Fixed.


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-28 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-28 
15:40:40 UTC ---
Ok, with additional -fno-inline -gnatpg I can reproduce even with the commands
I tried.

The dead_debug* stuff doesn't handle this probably because the hard reg isn't
ever becoming REG_DEAD or REG_UNUSED etc. in the IL, it is just unused
altogether plus set on entry.

I wonder if df_reg_chain_unlink/df_install_ref shouldn't just ignore DEBUG_INSN
refs when updating df-hard_regs_live_count array, do we care at all when
testing regs_ever_live if something is live in debug insns?


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-28 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-02-28
 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-28 
16:14:52 UTC ---
Created attachment 26772
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=26772
gcc47-pr52397.patch

Untested fix.  Not sure if that is the way we want to solve this though.


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-28 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

--- Comment #9 from Eric Botcazou ebotcazou at gcc dot gnu.org 2012-02-28 
16:33:42 UTC ---
 I wonder if df_reg_chain_unlink/df_install_ref shouldn't just ignore 
 DEBUG_INSN
 refs when updating df-hard_regs_live_count array, do we care at all when
 testing regs_ever_live if something is live in debug insns?

Probably not.  Moreover, hard_regs_live_count isn't used outside of df-scan.c
as both df_hard_reg_used_p and df_hard_reg_used_count are only used there (in
fact  the latter isn't used at all and could be eliminated altogether).


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-28 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

--- Comment #10 from Eric Botcazou ebotcazou at gcc dot gnu.org 2012-02-28 
16:41:04 UTC ---
 Untested fix.  Not sure if that is the way we want to solve this though.

You might want to adjust the comment in df.h because it will be totally off.


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2012-02-27 
10:49:23 UTC ---
ia64 is no longer primary/secondary.


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Eric Botcazou ebotcazou at gcc dot gnu.org 2012-02-27 
11:45:43 UTC ---
Jakub, would this impair debug info if we allowed the debug insn handling code
in delete_trivially_dead_insns to reset debug insn for dead (not used)
registers that are FUNCTION_ARG_REGNO_P?


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||aoliva at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-27 
11:54:24 UTC ---
What is specific about FUNCTION_ARG_REGNO_P regs?
We generally need to either reset, or adjust debug insns that refer registers
that aren't live at that point when ignoring the debug insn uses.


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

--- Comment #4 from Eric Botcazou ebotcazou at gcc dot gnu.org 2012-02-27 
12:04:16 UTC ---
 What is specific about FUNCTION_ARG_REGNO_P regs?

We know more or less how they behave.  They (may) hold arguments on entry and
thus have an artificial def in the entry block.  

 We generally need to either reset, or adjust debug insns that refer registers
 that aren't live at that point when ignoring the debug insn uses.

Sure, but doing it correctly for any hard register might prove tricky.


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-27 
12:57:21 UTC ---
We should already have code that should handle it, the question is where we
have a bug in it.
Anyway, can't reproduce with a cross:
./gnat1 -O2 -g uintp.adb -I ../../gcc/ada/ -fcompare-debug= --param
min-nondebug-insn-uid=1 -o uintp.s1  -fdump-final-insns=/tmp/1
./gnat1 -O2 -g uintp.adb -I ../../gcc/ada/ -fcompare-debug=-gtoggle -gtoggle
--param min-nondebug-insn-uid=1 -o uintp.s2  -fdump-final-insns=/tmp/2
yield the same dumps.  What options are you using?


[Bug bootstrap/52397] [4.7 regression] comparison failure with Ada enabled

2012-02-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52397

--- Comment #6 from Eric Botcazou ebotcazou at gcc dot gnu.org 2012-02-27 
17:14:14 UTC ---
 We should already have code that should handle it, the question is where we
 have a bug in it.

Do you mean the debug code in df-problems.c?

 Anyway, can't reproduce with a cross:
 ./gnat1 -O2 -g uintp.adb -I ../../gcc/ada/ -fcompare-debug= --param
 min-nondebug-insn-uid=1 -o uintp.s1  -fdump-final-insns=/tmp/1
 ./gnat1 -O2 -g uintp.adb -I ../../gcc/ada/ -fcompare-debug=-gtoggle -gtoggle
 --param min-nondebug-insn-uid=1 -o uintp.s2  -fdump-final-insns=/tmp/2
 yield the same dumps.  What options are you using?

With a cross from x86-64:

eric@atlantis:~/build/gcc/ia64-linux gcc/xgcc -Bgcc -S uintp.adb -O2 -gnatpg
-fno-inline -I ~/svn/gcc/gcc/ada -fcompare-debug
xgcc: error: uintp.adb: -fcompare-debug failure

Do not try to reduce with -fcompare-debug failure, you'll end up with another
debug compare failure that is unrelated (some differences in DECL numbering).