This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2004 09:45:52 -0000
- Subject: [Bug middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2
- References: <20040916205430.17526.wanderer@rsu.ru>
- Reply-to: gcc-bugzilla 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