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]

c/3954: simple returns are broken when the return value is in a pseudo



>Number:         3954
>Category:       c
>Synopsis:       simple returns are broken when the return value is in a pseudo
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 06 21:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dave Anglin
>Release:        gcc-3.0
>Organization:
>Environment:
vax-dec-ultrix4.3
>Description:
This was first noticed with g++ but potentially affect C as well.  It only affects ports that don't use an epilogue for function returns.

Incorrect code will be generated for the following test program when compiled with g++:

char *
srealloc (char *p, char *q, int i)
{
  if (i == 0)
    return p;
  else
    return q;
}
>How-To-Repeat:

>Fix:
A patch to fix the above problem is presently being tested.
If testing is successful, I will submit it later today for
review.
>Release-Note:
>Audit-Trail:
>Unformatted:


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