public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled
@ 2004-12-08 14:49 schwab at suse dot de
  2004-12-08 14:57 ` [Bug target/18888] " schwab at suse dot de
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: schwab at suse dot de @ 2004-12-08 14:49 UTC (permalink / raw)
  To: gcc-bugs

$ gcc-4.0 -O2 -std=gnu99 vfprintf.i  
$ ./a.out  
(null)  
  
$ gcc-3.4 -O2 -std=gnu99 vfprintf.i  
$ ./a.out  
asdf  
 
The problem is that "string = (char *) __builtin_va_arg(ap,const char *)" is 
compiled into this: 
 
	.mmi 
	adds r34 = 8, r34 
	;; 
	ld8 r37 = [r34] 
 
ie. preincrement instead of postincrement.

-- 
           Summary: [4.0 regression] __builtin_va_arg miscompiled
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schwab at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-linux


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug target/18888] [4.0 regression] __builtin_va_arg miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
@ 2004-12-08 14:57 ` schwab at suse dot de
  2004-12-08 14:58 ` pinskia at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: schwab at suse dot de @ 2004-12-08 14:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-12-08 14:56 -------
Created an attachment (id=7705)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7705&action=view)
Testcase


-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug target/18888] [4.0 regression] __builtin_va_arg miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
  2004-12-08 14:57 ` [Bug target/18888] " schwab at suse dot de
@ 2004-12-08 14:58 ` pinskia at gcc dot gnu dot org
  2004-12-08 15:06 ` pinskia at gcc dot gnu dot org
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-08 14:58 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
   Target Milestone|---                         |4.0.0


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug target/18888] [4.0 regression] __builtin_va_arg miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
  2004-12-08 14:57 ` [Bug target/18888] " schwab at suse dot de
  2004-12-08 14:58 ` pinskia at gcc dot gnu dot org
@ 2004-12-08 15:06 ` pinskia at gcc dot gnu dot org
  2004-12-08 16:56 ` hjl at lucon dot org
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-08 15:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-08 15:06 -------
The bug is most likely in ia64_gimplify_va_arg or in std_gimplify_va_arg_expr.

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug target/18888] [4.0 regression] __builtin_va_arg miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (2 preceding siblings ...)
  2004-12-08 15:06 ` pinskia at gcc dot gnu dot org
@ 2004-12-08 16:56 ` hjl at lucon dot org
  2004-12-09 10:11 ` schwab at suse dot de
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: hjl at lucon dot org @ 2004-12-08 16:56 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl at lucon dot org


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug target/18888] [4.0 regression] __builtin_va_arg miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (3 preceding siblings ...)
  2004-12-08 16:56 ` hjl at lucon dot org
@ 2004-12-09 10:11 ` schwab at suse dot de
  2004-12-09 13:08 ` [Bug tree-optimization/18888] " pinskia at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: schwab at suse dot de @ 2004-12-09 10:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-12-09 10:11 -------
Created an attachment (id=7711)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7711&action=view)
Reduced testcase


-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] __builtin_va_arg miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (4 preceding siblings ...)
  2004-12-09 10:11 ` schwab at suse dot de
@ 2004-12-09 13:08 ` pinskia at gcc dot gnu dot org
  2004-12-09 13:14 ` [Bug tree-optimization/18888] [4.0 regression] loops miscompiled pinskia at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-09 13:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-09 13:08 -------
Hmm, for me it passes at -O0 and fails at -O1 and this on ppc-darwin so it is definitely not target 
related at all.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|target                      |tree-optimization
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-09 13:08:05
               date|                            |


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (5 preceding siblings ...)
  2004-12-09 13:08 ` [Bug tree-optimization/18888] " pinskia at gcc dot gnu dot org
@ 2004-12-09 13:14 ` pinskia at gcc dot gnu dot org
  2004-12-09 14:13 ` pinskia at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-09 13:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-09 13:14 -------
I think this is caused by the same problem as PR 18694.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |18694
            Summary|[4.0 regression]            |[4.0 regression] loops
                   |__builtin_va_arg miscompiled|miscompiled


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (6 preceding siblings ...)
  2004-12-09 13:14 ` [Bug tree-optimization/18888] [4.0 regression] loops miscompiled pinskia at gcc dot gnu dot org
@ 2004-12-09 14:13 ` pinskia at gcc dot gnu dot org
  2004-12-09 17:03 ` schwab at suse dot de
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-09 14:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-09 14:13 -------
Here as reduced testcase as I could find:
typedef long unsigned int size_t;
extern void abort (void);
extern char *strcpy (char *, const char *);
extern int strcmp (const char *, const char *);
typedef __builtin_va_list va_list;
static const char null[] = "(null)";
int g (char *s, const char *format, va_list ap)
{
  const char *f;
  const char *string;
  char spec;
  static const void *step0_jumps[] = {
    &&do_precision,
    &&do_form_integer,
    &&do_form_string,
  };
  f = format;
  if (*f == '\0')
    goto all_done;
  do
    {
      spec = (*++f);
      goto *(step0_jumps[2]);
      
    /* begin switch table. */
    do_precision:
      ++f;
      __builtin_va_arg (ap, int);
      spec = *f;
      goto *(step0_jumps[2]);
      
      do_form_integer:
	__builtin_va_arg (ap, unsigned long int);
	goto end;
	
      do_form_string:
	string = __builtin_va_arg (ap, const char *);
	strcpy (s, string);
      
      /* End of switch table. */
      end:
      ++f;
    }
  while (*f != '\0');

all_done:
  return 0;
}

void
f (char *s, const char *f, ...)
{
  va_list ap;
  __builtin_va_start (ap, f);
  g (s, f, ap);
  __builtin_va_end (ap);
}

int
main (void)
{
  char buf[10];
  f (buf, "%s", "asdf", 0);
  if (strcmp (buf, "asdf"))
    abort ();
  return 0;
}

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (7 preceding siblings ...)
  2004-12-09 14:13 ` pinskia at gcc dot gnu dot org
@ 2004-12-09 17:03 ` schwab at suse dot de
  2004-12-10  5:12 ` kazu at cs dot umass dot edu
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: schwab at suse dot de @ 2004-12-09 17:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-12-09 17:03 -------
I have identified this patch as the trigger: 
 
2004-10-25  Kazu Hirata  <kazu@cs.umass.edu> 
 
	* cfg.c (unchecked_make_edge, redirect_edge_succ, 
	redirect_edge_pred): Use VEC_safe_push instead of 
	VEC_safe_insert. 
	* cfgrtl.c (force_nonfallthru_and_redirect): Likewise. 
 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kazu at cs dot umass dot edu


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (8 preceding siblings ...)
  2004-12-09 17:03 ` schwab at suse dot de
@ 2004-12-10  5:12 ` kazu at cs dot umass dot edu
  2004-12-10 11:06 ` steven at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-12-10  5:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2004-12-10 05:12 -------
Does the following patch help?

http://gcc.gnu.org/ml/gcc-patches/2004-12/msg00727.html

Do you know which pass is causing a problem?


-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (9 preceding siblings ...)
  2004-12-10  5:12 ` kazu at cs dot umass dot edu
@ 2004-12-10 11:06 ` steven at gcc dot gnu dot org
  2004-12-10 12:00 ` schwab at suse dot de
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-10 11:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-10 11:05 -------
The patch identified in comment #7 really can't have caused this,
at worst it uncovered a latent bug because the order of edges is
changed after this patch - but no pass should depend on the edges
being in any specific order so the bug is elsewhere.


-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (10 preceding siblings ...)
  2004-12-10 11:06 ` steven at gcc dot gnu dot org
@ 2004-12-10 12:00 ` schwab at suse dot de
  2004-12-13 21:00 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: schwab at suse dot de @ 2004-12-10 12:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-12-10 12:00 -------
The patch did not help. -fno-tree-dominator-opts is a workaround. 

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (11 preceding siblings ...)
  2004-12-10 12:00 ` schwab at suse dot de
@ 2004-12-13 21:00 ` pinskia at gcc dot gnu dot org
  2004-12-13 21:01 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-13 21:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-13 21:00 -------
Yes the patch wich fixed PR 18694 also fixed this on powerpc-darwin.  Can you try again on ia64?

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (12 preceding siblings ...)
  2004-12-13 21:00 ` pinskia at gcc dot gnu dot org
@ 2004-12-13 21:01 ` pinskia at gcc dot gnu dot org
  2004-12-13 23:08 ` schwab at suse dot de
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-13 21:01 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18888 depends on bug 18694, which changed state.

Bug 18694 Summary: [4.0 regression] loop miscompilation at -O1 (-ftree-ch)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18694

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (13 preceding siblings ...)
  2004-12-13 21:01 ` pinskia at gcc dot gnu dot org
@ 2004-12-13 23:08 ` schwab at suse dot de
  2004-12-14  0:12 ` law at redhat dot com
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: schwab at suse dot de @ 2004-12-13 23:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-12-13 23:08 -------
Still not fixed. 

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (14 preceding siblings ...)
  2004-12-13 23:08 ` schwab at suse dot de
@ 2004-12-14  0:12 ` law at redhat dot com
  2004-12-14  0:24 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: law at redhat dot com @ 2004-12-14  0:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From law at redhat dot com  2004-12-14 00:12 -------
Subject: Re:  [4.0 regression] loops
	miscompiled

On Mon, 2004-12-13 at 23:08 +0000, schwab at suse dot de wrote:
> ------- Additional Comments From schwab at suse dot de  2004-12-13 23:08 -------
> Still not fixed. 
Yea.  I was pretty sure it wasn't as I got the same code before/after my
fix for this testcase.
jeff




-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (15 preceding siblings ...)
  2004-12-14  0:12 ` law at redhat dot com
@ 2004-12-14  0:24 ` pinskia at gcc dot gnu dot org
  2004-12-14  0:39 ` law at redhat dot com
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-14  0:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-14 00:24 -------
(In reply to comment #13)
> Subject: Re:  [4.0 regression] loops
>         miscompiled
> 
> On Mon, 2004-12-13 at 23:08 +0000, schwab at suse dot de wrote:
> > ------- Additional Comments From schwab at suse dot de  2004-12-13 23:08 -------
> > Still not fixed. 
> Yea.  I was pretty sure it wasn't as I got the same code before/after my
> fix for this testcase.

Then how do you explain it being fixed for me on ppc-darwin, I tried with a compiler
right before your patch and it was broken but right after wards it was fixed.

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (16 preceding siblings ...)
  2004-12-14  0:24 ` pinskia at gcc dot gnu dot org
@ 2004-12-14  0:39 ` law at redhat dot com
  2004-12-14 15:49 ` law at redhat dot com
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: law at redhat dot com @ 2004-12-14  0:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From law at redhat dot com  2004-12-14 00:39 -------
Subject: Re:  [4.0 regression] loops
	miscompiled

On Tue, 2004-12-14 at 00:24 +0000, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-14 00:24 -------
> (In reply to comment #13)
> > Subject: Re:  [4.0 regression] loops
> >         miscompiled
> > 
> > On Mon, 2004-12-13 at 23:08 +0000, schwab at suse dot de wrote:
> > > ------- Additional Comments From schwab at suse dot de  2004-12-13 23:08 -------
> > > Still not fixed. 
> > Yea.  I was pretty sure it wasn't as I got the same code before/after my
> > fix for this testcase.
> 
> Then how do you explain it being fixed for me on ppc-darwin, I tried with a compiler
> right before your patch and it was broken but right after wards it was fixed.
I didn't test darwin, I was looking at ia-64 via a cross compiler.
jeff




-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (17 preceding siblings ...)
  2004-12-14  0:39 ` law at redhat dot com
@ 2004-12-14 15:49 ` law at redhat dot com
  2004-12-14 17:34 ` law at redhat dot com
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: law at redhat dot com @ 2004-12-14 15:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From law at redhat dot com  2004-12-14 15:49 -------
Definitely a different problem than 18694.  I'm looking at it now.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|18694                       |


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (18 preceding siblings ...)
  2004-12-14 15:49 ` law at redhat dot com
@ 2004-12-14 17:34 ` law at redhat dot com
  2004-12-14 17:55 ` law at redhat dot com
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: law at redhat dot com @ 2004-12-14 17:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From law at redhat dot com  2004-12-14 17:33 -------
This appears to be a bug in how we coalesce objects appearing in abnormal
PHIs.  [ We get abnormal PHIs because of the computed gotos. ]

I've got a patch which appears to generate the right code for this testcase
and I'll be testing today.  I will (of course) post a more detailed analysis
when I officially submit the patch.

Jeff

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (19 preceding siblings ...)
  2004-12-14 17:34 ` law at redhat dot com
@ 2004-12-14 17:55 ` law at redhat dot com
  2004-12-14 20:07 ` law at redhat dot com
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: law at redhat dot com @ 2004-12-14 17:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From law at redhat dot com  2004-12-14 17:55 -------
BTW, it's pretty easy now that I've sat down and analyzed this test to see
that my tree-ssa-dom.c patch from yesterday to fix pr18694 merely masked this
bug (pr18888) on Darwin.

As I mentioned earlier today, pr18888 is a problem in how we handle
coalescing and abnormal edges and is going to be very sensitive to the
precise order in which we decide to coalesce objects.

Yesterday's tree-ssa-dom.c patch for 18694 can very easily change coalescing
orderings and thus could easily mask this bug.



-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (20 preceding siblings ...)
  2004-12-14 17:55 ` law at redhat dot com
@ 2004-12-14 20:07 ` law at redhat dot com
  2004-12-14 20:29 ` pinskia at gcc dot gnu dot org
  2004-12-14 23:27 ` giovannibajo at libero dot it
  23 siblings, 0 replies; 25+ messages in thread
From: law at redhat dot com @ 2004-12-14 20:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From law at redhat dot com  2004-12-14 20:07 -------
Should be fixed with today's checkin to tree-outof-ssa.c.

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (21 preceding siblings ...)
  2004-12-14 20:07 ` law at redhat dot com
@ 2004-12-14 20:29 ` pinskia at gcc dot gnu dot org
  2004-12-14 23:27 ` giovannibajo at libero dot it
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-14 20:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-14 20:29 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/18888] [4.0 regression] loops miscompiled
  2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
                   ` (22 preceding siblings ...)
  2004-12-14 20:29 ` pinskia at gcc dot gnu dot org
@ 2004-12-14 23:27 ` giovannibajo at libero dot it
  23 siblings, 0 replies; 25+ messages in thread
From: giovannibajo at libero dot it @ 2004-12-14 23:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-12-14 23:27 -------
Patch is here:
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01070.html

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2004-12-14 23:27 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-08 14:49 [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled schwab at suse dot de
2004-12-08 14:57 ` [Bug target/18888] " schwab at suse dot de
2004-12-08 14:58 ` pinskia at gcc dot gnu dot org
2004-12-08 15:06 ` pinskia at gcc dot gnu dot org
2004-12-08 16:56 ` hjl at lucon dot org
2004-12-09 10:11 ` schwab at suse dot de
2004-12-09 13:08 ` [Bug tree-optimization/18888] " pinskia at gcc dot gnu dot org
2004-12-09 13:14 ` [Bug tree-optimization/18888] [4.0 regression] loops miscompiled pinskia at gcc dot gnu dot org
2004-12-09 14:13 ` pinskia at gcc dot gnu dot org
2004-12-09 17:03 ` schwab at suse dot de
2004-12-10  5:12 ` kazu at cs dot umass dot edu
2004-12-10 11:06 ` steven at gcc dot gnu dot org
2004-12-10 12:00 ` schwab at suse dot de
2004-12-13 21:00 ` pinskia at gcc dot gnu dot org
2004-12-13 21:01 ` pinskia at gcc dot gnu dot org
2004-12-13 23:08 ` schwab at suse dot de
2004-12-14  0:12 ` law at redhat dot com
2004-12-14  0:24 ` pinskia at gcc dot gnu dot org
2004-12-14  0:39 ` law at redhat dot com
2004-12-14 15:49 ` law at redhat dot com
2004-12-14 17:34 ` law at redhat dot com
2004-12-14 17:55 ` law at redhat dot com
2004-12-14 20:07 ` law at redhat dot com
2004-12-14 20:29 ` pinskia at gcc dot gnu dot org
2004-12-14 23:27 ` giovannibajo at libero dot it

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).