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 middle-end/17526] [4.0 Regression] libcpp is miscompiled with -fno-pcc-struct-return -O2


------- 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


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