[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2008-05-25 Thread rguenth at gcc dot gnu dot org


--- Comment #35 from rguenth at gcc dot gnu dot org  2008-05-25 17:17 
---
Subject: Bug 17526

Author: rguenth
Date: Sun May 25 17:16:38 2008
New Revision: 135876

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135876
Log:
2008-05-25  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/17526
* gcc.dg/torture/pr17526.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr17526.c
Modified:
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2005-03-04 Thread wanderer at rsu dot ru

--- Additional Comments From wanderer at rsu dot ru  2005-03-04 10:43 
---
Current CVS mainline bootstrap fine at self with and without reverting patch 
in #30.

-- 


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2005-03-04 Thread wanderer at rsu dot ru

--- Additional Comments From wanderer at rsu dot ru  2005-03-04 11:27 
---
Ops... sorry.

I withdraw my prev. note.
Current mainline CVS GCC fail bootstrap with reverted patch in #30


-- 
   What|Removed |Added

 CC||olh at suse dot de


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2005-03-03 Thread olh at suse dot de

--- Additional Comments From olh at suse dot de  2005-03-03 23:52 ---
can these errors still be reproduced with current gcc 4.0 branch?
the applied patch causes regressions:

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



-- 


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2004-10-31 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-31 09:17 
---
Subject: Bug 17526

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2004-10-31 09:17:42

Modified files:
gcc: ChangeLog tree-gimple.c 

Log message:
PR middle-end/17526
* tree-gimple.c (is_gimple_mem_rhs): Also require a val for
aggregate types that are not BLKmode.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gccr1=2.6111r2=2.6112
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-gimple.c.diff?cvsroot=gccr1=2.29r2=2.30



-- 


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2004-10-31 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-31 15:09 
---
Fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2004-10-29 Thread jason at gcc dot gnu dot org

--- Additional Comments From jason at gcc dot gnu dot org  2004-10-29 21:46 ---
The problem seems to be an incorrect tailcall.  Before my patch, *p = foo()
was turned into T.1 = foo(); *p = T.1;.  After my patch, the gimplifier no
longer introduced a temporary.  If A is returned in memory the tailcall pass
then marks the line *p = foo() as a tailcall, losing the assignment in the
process.

I think I'll fix this by using a temporary for all non-BLKmode types, but this
also seems like a bug in the tailcall pass.


-- 


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2004-10-26 Thread reichelt at gcc dot gnu dot org

--- Additional Comments From reichelt at gcc dot gnu dot org  2004-10-26 09:18 
---
Andrew's example in comment #26 is broken.
ret.cd is set to 2 and therefore we have a.b.cd!=1 which triggers the abort.

Nevertheless, here's a reduced testcase derived from comment #25:


void abort(void);

typedef struct { int i; } A;

A foo(void)
{
  A a = { 1 };
  int j;
  for (j=0; j2; j++) ;
  return a;
}

void bar(A *p)
{
  *p = foo();
}

int main(void)
{
  A a;
  bar(a);
  if (a.i != 1)
abort();
  return 0;
}



-- 
   What|Removed |Added

 CC||reichelt at gcc dot gnu dot
   ||org
   Keywords||monitored


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2004-10-26 Thread reichelt at gcc dot gnu dot org

--- Additional Comments From reichelt at gcc dot gnu dot org  2004-10-26 09:45 
---
I can confirm that the bug was introduced with Jason's patch
http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg00788.html
as pointed out in comment #16.

Jason, could you please have a look?

Btw, here's an even shorter testcase:

===
void abort(void);

typedef struct { int i; } A;

A foo(void)
{
A a = { 0 };
return a;
}

void bar(A *p)
{
*p = foo();
}

int main(void)
{
A a;
bar(a);
if (a.i) abort();
return 0;
}
===


-- 
   What|Removed |Added

 CC||jason at gcc dot gnu dot org


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


[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2

2004-10-26 Thread jason at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED


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