This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/12809] New: ICE when profiling code returning structures
- From: "hpenner at de dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2003 10:26:06 -0000
- Subject: [Bug middle-end/12809] New: ICE when profiling code returning structures
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12809
Summary: ICE when profiling code returning structures
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hpenner at de dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc64-unknown-linux
GCC host triplet: powerpc64-unknown-linux
GCC target triplet: powerpc64-unknown-linux
When compiling following testcase on powerpc64-linux, get a ICE. (gcc -p t.c)
typedef struct {int a;int b;} a_t;
a_t
mai()
{
return (a_t) {0,0};
}
ICE happens in profile_function. On PPC64 ASM_OUTPUT_REG_PUSH is defined,
but only generates code for the system V ABI. On the other hand,
current_function_returns_struct returns zero.
This means,
#if defined(ASM_OUTPUT_REG_PUSH)
if (sval && GET_CODE (svrtx) == REG)
ASM_OUTPUT_REG_PUSH (file, REGNO (svrtx));
#endif
will crash. This could also happen on other platforms defining ASM_OUTPUT_REG_PUSH.