[Bug middle-end/12809] New: ICE when profiling code returning structures

hpenner at de dot ibm dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 28 10:31:00 GMT 2003


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.



More information about the Gcc-bugs mailing list