public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12535] New: Attempt to delete prologue/epilogue insn
@ 2003-10-08  0:02 abacau at yahoo dot com dot au
  2003-10-08  0:04 ` [Bug c/12535] " abacau at yahoo dot com dot au
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: abacau at yahoo dot com dot au @ 2003-10-08  0:02 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535

           Summary: Attempt to delete prologue/epilogue insn
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: abacau at yahoo dot com dot au
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc--netbsd

When attempting to compile src/sys/compat/mach/mach_vm.c from the netbsd-current source 
tree, the compiler fails with the following error:

/usr/src/obj/tooldir.NetBSD-1.6ZC-powerpc/bin/powerpc--netbsd-gcc -v -save-temps -msoft-
float   -ffreestanding -g -O2 -Wreturn-type -Werror -Wall -Wno-main -Wno-format-zero-length 
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -Wno-
uninitialized  -Dmacppc -I.  -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DDIAGNOSTIC -
DZS_CONSOLE_ABORT -DDEBUG_DARWIN -DDEBUG_MACH -DOFB_ENABLE_CACHE -
DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT   -c /usr/src/sys/compat/mach/mach_vm.c
Reading specs from /usr/src/obj/tooldir.NetBSD-1.6ZC-powerpc/lib/gcc-lib/powerpc--netbsd/
3.3.1/specs
Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc/configure --target=powerpc--netbsd --
disable-nls --enable-long-long --disable-multilib --enable-threads --program-transform-
name=s,^,powerpc--netbsd-, --enable-languages=c c++ objc f77 --prefix=/usr/src/obj/
tooldir.NetBSD-1.6ZC-powerpc --disable-shared
Thread model: posix
gcc version 3.3.1
 /usr/src/obj/tooldir.NetBSD-1.6ZC-powerpc/lib/gcc-lib/powerpc--netbsd/3.3.1/cc1 -E -quiet -
nostdinc -v -I. -I/usr/src/sys/arch -I/usr/src/sys -D__GNUC__=3 -D__GNUC_MINOR__=3 -
D__GNUC_PATCHLEVEL__=1 -Dmacppc -DLKM -DDIAGNOSTIC -DZS_CONSOLE_ABORT -
DDEBUG_DARWIN -DDEBUG_MACH -DOFB_ENABLE_CACHE -DMAXUSERS=32 -D_KERNEL -
D_KERNEL_OPT /usr/src/sys/compat/mach/mach_vm.c -msoft-float -Wreturn-type -Werror -Wall 
-Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-
prototypes -Wno-sign-compare -Wno-uninitialized -ffreestanding -O2 mach_vm.i
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/src/sys/arch
 /usr/src/sys
End of search list.
 /usr/src/obj/tooldir.NetBSD-1.6ZC-powerpc/lib/gcc-lib/powerpc--netbsd/3.3.1/cc1 -
fpreprocessed mach_vm.i -quiet -dumpbase mach_vm.c -msoft-float -auxbase mach_vm -g -O2 
-Wreturn-type -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-
prototypes -Wstrict-prototypes -Wno-sign-compare -Wno-uninitialized -version -ffreestanding -
o mach_vm.s
GNU C version 3.3.1 (powerpc--netbsd)
        compiled by GNU C version 3.3.1.
GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=16384
/usr/src/sys/compat/mach/mach_vm.c: In function `mach_vm_wire':
/usr/src/sys/compat/mach/mach_vm.c:304: error: Attempt to delete prologue/epilogue insn:
(insn/f 233 232 234 0 0x0 (set (mem:SI (plus:SI (reg/f:SI 1 r1)
                (const_int 68 [0x44])) [0 S4 A8])
        (reg:SI 0 r0)) -1 (nil)
    (expr_list:REG_FRAME_RELATED_EXPR (set (mem:SI (plus:SI (reg/f:SI 1 r1)
                    (const_int 68 [0x44])) [0 S4 A8])
            (reg:SI 65 lr))
        (nil)))
/usr/src/sys/compat/mach/mach_vm.c:304: internal compiler error: in propagate_one_insn, at 
flow.c:1642


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
@ 2003-10-08  0:04 ` abacau at yahoo dot com dot au
  2003-10-08  0:10 ` [Bug optimization/12535] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: abacau at yahoo dot com dot au @ 2003-10-08  0:04 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535



------- Additional Comments From abacau at yahoo dot com dot au  2003-10-08 00:04 -------
Created an attachment (id=4897)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4897&action=view)
preprocessed file with error


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
  2003-10-08  0:04 ` [Bug c/12535] " abacau at yahoo dot com dot au
@ 2003-10-08  0:10 ` pinskia at gcc dot gnu dot org
  2003-10-11  3:29 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-08  0:10 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |optimization
           Keywords|                            |ice-on-valid-code


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
  2003-10-08  0:04 ` [Bug c/12535] " abacau at yahoo dot com dot au
  2003-10-08  0:10 ` [Bug optimization/12535] " pinskia at gcc dot gnu dot org
@ 2003-10-11  3:29 ` pinskia at gcc dot gnu dot org
  2003-10-12  8:21 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-11  3:29 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|powerpc--netbsd             |
 GCC target triplet|                            |powerpc--netbsd


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
                   ` (2 preceding siblings ...)
  2003-10-11  3:29 ` pinskia at gcc dot gnu dot org
@ 2003-10-12  8:21 ` pinskia at gcc dot gnu dot org
  2003-10-14  9:50 ` segher at kernel dot crashing dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-12  8:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-12 08:20 -------
Here is the reduced sources (might be fixed on the mainline):
typedef struct {
	int i;
	int j;
	int k;
	int l;
} mach_msg_header_t;
struct mach_trap_args {
        void *rmsg;
};
typedef struct {
        mach_msg_header_t rep_msgh;
} mach_vm_wire_reply_t;
int
mach_vm_wire(args)
        struct mach_trap_args *args;
{
        mach_vm_wire_reply_t *rep = args->rmsg;
        __builtin_memset((&rep), 0, (sizeof(*rep)));
	return mach_msg_error(args, 22);
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
                   ` (3 preceding siblings ...)
  2003-10-12  8:21 ` pinskia at gcc dot gnu dot org
@ 2003-10-14  9:50 ` segher at kernel dot crashing dot org
  2003-10-14 16:55 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: segher at kernel dot crashing dot org @ 2003-10-14  9:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535



------- Additional Comments From segher at kernel dot crashing dot org  2003-10-14 09:50 -------
        __builtin_memset((&rep), 0, (sizeof(*rep)));

is of course invalid code.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
                   ` (4 preceding siblings ...)
  2003-10-14  9:50 ` segher at kernel dot crashing dot org
@ 2003-10-14 16:55 ` pinskia at gcc dot gnu dot org
  2004-01-07  1:25 ` pinskia at gcc dot gnu dot org
  2005-09-07 14:39 ` [Bug rtl-optimization/12535] " amodra at bigpond dot net dot au
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-14 16:55 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|ice-on-valid-code           |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-14 16:55:41
               date|                            |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-14 16:55 -------
        __builtin_memset((&rep), 0, (sizeof(*rep)));
Is overriding the slot for the link register so gcc is trying to remove the instruction that 
stores the link register on the stack so gcc ICEs.

The reason why this ICE on netbsd and linux and not Darwin and AIX is because the ABI 
is different as Darwin uses the AIX stack frame while netbsd and linux uses the SYSV 
one.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
                   ` (5 preceding siblings ...)
  2003-10-14 16:55 ` pinskia at gcc dot gnu dot org
@ 2004-01-07  1:25 ` pinskia at gcc dot gnu dot org
  2005-09-07 14:39 ` [Bug rtl-optimization/12535] " amodra at bigpond dot net dot au
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-07  1:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-07 01:25 -------
*** Bug 13593 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at csd dot uu dot se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/12535] Attempt to delete prologue/epilogue insn
  2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
                   ` (6 preceding siblings ...)
  2004-01-07  1:25 ` pinskia at gcc dot gnu dot org
@ 2005-09-07 14:39 ` amodra at bigpond dot net dot au
  7 siblings, 0 replies; 9+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-09-07 14:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2005-09-07 14:39 -------
Simplified testcase.  This bug is probably a WONTFIX.

int bar (int *);

int foo (void)
{
  int x;
  __builtin_memset (&x, 0, 32);
  return bar (&x);
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.4.5 4.0.2 4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12535


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-09-07 14:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08  0:02 [Bug c/12535] New: Attempt to delete prologue/epilogue insn abacau at yahoo dot com dot au
2003-10-08  0:04 ` [Bug c/12535] " abacau at yahoo dot com dot au
2003-10-08  0:10 ` [Bug optimization/12535] " pinskia at gcc dot gnu dot org
2003-10-11  3:29 ` pinskia at gcc dot gnu dot org
2003-10-12  8:21 ` pinskia at gcc dot gnu dot org
2003-10-14  9:50 ` segher at kernel dot crashing dot org
2003-10-14 16:55 ` pinskia at gcc dot gnu dot org
2004-01-07  1:25 ` pinskia at gcc dot gnu dot org
2005-09-07 14:39 ` [Bug rtl-optimization/12535] " amodra at bigpond dot net dot au

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).