public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/33096] New: Internal compiler error with register global variables
@ 2007-08-17 7:55 slava at factorcode dot org
2007-08-17 7:56 ` [Bug c/33096] " slava at factorcode dot org
2007-08-17 9:03 ` [Bug target/33096] " pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: slava at factorcode dot org @ 2007-08-17 7:55 UTC (permalink / raw)
To: gcc-bugs
Compile the following program with -O3 on FreeBSD or Linux, x86:
///////////////
#include <stdlib.h>
#include <string.h>
register long foo asm("esi");
register long bar asm("edi");
char * crash_me_baby(char *str) {
char *path = malloc(1024 + strlen(str));
return path;
}
///////////////
This results in an error like the following:
test.c:10: error: unable to find a register to spill in class 'DIREG'
test.c:10: error: this is the insn:
(insn:HI 16 83 17 2 (parallel [
(set (reg:SI 2 cx [66])
(unspec:SI [
(mem:BLK (reg/v/f:SI 63 [ suffix ]) [0 A8])
(reg:QI 0 ax [70])
(const_int 1 [0x1])
(reg:SI 2 cx [69])
] 20))
(use (reg:SI 19 dirflag))
(clobber (reg/f:SI 68 [ suffix ]))
(clobber (reg:CC 17 flags))
]) 530 {*strlenqi_1} (insn_list:REG_DEP_TRUE 6 (insn_list:REG_DEP_TRUE
12 (insn_list:REG_DEP_TRUE 14 (insn_list:REG_DEP_TRUE 15 (nil)))))
(expr_list:REG_DEAD (reg:SI 19 dirflag)
(expr_list:REG_DEAD (reg:SI 2 cx [69])
(expr_list:REG_DEAD (reg:QI 0 ax [70])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_UNUSED (reg/f:SI 68 [ suffix ])
(expr_list:REG_EQUAL (unspec:SI [
(mem:BLK (reg/v/f:SI 63 [ suffix ]) [0 A8])
(reg:QI 0 ax [70])
(const_int 1 [0x1])
(reg:SI 2 cx [69])
] 20)
(nil))))))))
--
Summary: Internal compiler error with register global variables
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: slava at factorcode dot org
GCC build triplet: i386-unknown-freebsd6.2
GCC host triplet: i386-unknown-freebsd6.2
GCC target triplet: i386-unknown-freebsd6.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33096
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/33096] Internal compiler error with register global variables
2007-08-17 7:55 [Bug c/33096] New: Internal compiler error with register global variables slava at factorcode dot org
@ 2007-08-17 7:56 ` slava at factorcode dot org
2007-08-17 9:03 ` [Bug target/33096] " pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: slava at factorcode dot org @ 2007-08-17 7:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from slava at factorcode dot org 2007-08-17 07:56 -------
Created an attachment (id=14068)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14068&action=view)
Test case
This is a test case for the bug. Compile with -O1, -O2 or -O3 to trigger it.
With -O0, it compiles fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33096
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/33096] Internal compiler error with register global variables
2007-08-17 7:55 [Bug c/33096] New: Internal compiler error with register global variables slava at factorcode dot org
2007-08-17 7:56 ` [Bug c/33096] " slava at factorcode dot org
@ 2007-08-17 9:03 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-17 9:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-08-17 09:03 -------
*** This bug has been marked as a duplicate of 11001 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|c |target
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33096
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-17 9:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-17 7:55 [Bug c/33096] New: Internal compiler error with register global variables slava at factorcode dot org
2007-08-17 7:56 ` [Bug c/33096] " slava at factorcode dot org
2007-08-17 9:03 ` [Bug target/33096] " pinskia at gcc dot gnu dot org
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).