This is the mail archive of the gcc-bugs@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]

[Bug target/11516] [3.4 regression] miscompiled of genattrtab.c in stage2


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From ghazi at caip dot rutgers dot edu  2003-07-21 16:09 -------
Subject: Re:  [3.4 regression] miscompiled of genattrtab.c in stage2

 > The regression was introduced by the following patch:
 > 
 > 2003-07-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 > 
 >         * genattrtab.h: Add new macros for attr `special' flags.
 >         * genattrtab.c (attr_desc): Reorder/resize fields better.
 >         Use attr `special' macros in all calls to make_internal_attr.
 >         * genautomata.c: Likewise.


Hmmm, while you may have first seen a problem after my patch was
introduced, I can't see how the patch could be the root cause of any
problem you have.  There must be something elsewhere where the bug
lies.  As you said, the problem is in stage2 so there is a deeper
miscompilation occuring IMHO.  I understand and support our policy
regarding one patch uncovering a latent bug elsewhere, but the changes
I introduce are so innocuous that I believe you should fix the root
cause rather than invoke the policy to remove my patch.

As a test I reverted these two patches:
http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00653.html
http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00575.html

and built insn-attrtab.c in a cross-configuration targetted to
hppa64-hppa-hpux11.11.  The differences in the generated file from the
reverted case and current CVS are all expected and simple.  Some
redundant prototypes are removed, `internal_dfa_insn_code' is made
static and `internal_reset' in made inline.  No other changes.

If I can be of assistance let me know, but I don't have access to hpux
so I can't investigate a stage2 miscompilation.


--- hpux-revert/build/gcc/insn-attrtab.c	2003-07-21 11:40:08.203855000 -0400
+++ hpux-current/build/gcc/insn-attrtab.c	2003-07-21 11:41:01.238773000 -0400
@@ -21,3 +21,2 @@ from the machine description file `md'. 
 
-extern int insn_current_length (rtx);
 int
@@ -584,3 +583,2 @@ insn_current_length (rtx insn ATTRIBUTE_
 
-extern int insn_variable_length_p (rtx);
 int
@@ -633,3 +631,2 @@ insn_variable_length_p (rtx insn ATTRIBU
 
-extern int insn_default_length (rtx);
 int
@@ -992,3 +989,2 @@ insn_default_length (rtx insn ATTRIBUTE_
 
-extern int bypass_p (rtx);
 int
@@ -1184,3 +1180,2 @@ bypass_p (rtx insn ATTRIBUTE_UNUSED)
 
-extern int insn_default_latency (rtx);
 int
@@ -1995,3 +1990,2 @@ insn_default_latency (rtx insn ATTRIBUTE
 #if AUTOMATON_ALTS
-extern int insn_alts (rtx);
 int
@@ -2673,4 +2667,3 @@ insn_alts (rtx insn ATTRIBUTE_UNUSED)
 
-extern int internal_dfa_insn_code (rtx);
-int
+static int
 internal_dfa_insn_code (rtx insn ATTRIBUTE_UNUSED)
@@ -4314,3 +4307,2 @@ internal_dfa_insn_code (rtx insn ATTRIBU
 
-extern int result_ready_cost (rtx);
 int
@@ -4330,3 +4322,2 @@ result_ready_cost (rtx insn ATTRIBUTE_UN
 
-extern int function_units_used (rtx);
 int
@@ -4346,3 +4337,2 @@ function_units_used (rtx insn ATTRIBUTE_
 
-extern int num_delay_slots (rtx);
 int
@@ -4432,3 +4422,2 @@ num_delay_slots (rtx insn ATTRIBUTE_UNUS
 
-extern enum attr_in_call_delay get_attr_in_call_delay (rtx);
 enum attr_in_call_delay
@@ -4646,3 +4635,2 @@ get_attr_in_call_delay (rtx insn ATTRIBU
 
-extern enum attr_in_nullified_branch_delay get_attr_in_nullified_branch_delay (rtx);
 enum attr_in_nullified_branch_delay
@@ -4870,3 +4858,2 @@ get_attr_in_nullified_branch_delay (rtx 
 
-extern enum attr_in_branch_delay get_attr_in_branch_delay (rtx);
 enum attr_in_branch_delay
@@ -5074,3 +5061,2 @@ get_attr_in_branch_delay (rtx insn ATTRI
 
-extern enum attr_pa_combine_type get_attr_pa_combine_type (rtx);
 enum attr_pa_combine_type
@@ -5116,3 +5102,2 @@ get_attr_pa_combine_type (rtx insn ATTRI
 
-extern enum attr_type get_attr_type (rtx);
 enum attr_type
@@ -12268,3 +12253,3 @@ state_size (void)
 
-static void
+static inline void
 internal_reset (struct DFA_chip *chip)


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