public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15539] New: With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642"
@ 2004-05-20 4:56 asbin at asbin dot org
2004-05-20 5:50 ` [Bug target/15539] [3.3 Regression] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: asbin at asbin dot org @ 2004-05-20 4:56 UTC (permalink / raw)
To: gcc-bugs
gcc -v output :
****************
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 (Debian 20040429)
****************
I was writing a fonction "isnumber" to find is a string is a number. So I used
strtol, but I made a mistake, which produce the text :
****************
isnumber.c: In function `isnumber':
isnumber.c:14: error: Attempt to delete prologue/epilogue insn:
(insn/f 80 79 81 0 (nil) (set (mem:SI (plus:SI (reg/f:SI 6 ebp)
(const_int -4 [0xfffffffc])) [0 S4 A8])
(reg:SI 3 ebx)) -1 (nil)
(nil))
isnumber.c:14: internal compiler error: in propagate_one_insn, at flow.c:1642
Please submit a full bug report,
****************
After some tests, I found that this is produce only with some kinds of -O
optimization..
I have extracted two examples that doesn't compile :
****************
/* gcc flag
* -O0 : works
* -O1 : works
* -O2 : doesn't work
* -O3 : doesn't work
*/
int isnumber1_bug(const char *chaine) {
char *endptr[1];
endptr[1] = '\0';
strtol(chaine,endptr,10);
return *chaine != '\0' && **endptr == '\0';
}
****************
/* gcc flag
* -O0 : works
* -O1 : doesn't work
* -O2 : doesn't work
* -O3 : doesn't work
*/
int isnumber2_bug(const char *chaine) {
char *endptr[1];
endptr[1] = '\0';
strtol(chaine,(char **)NULL,10);
return *chaine != '\0';
}
****************
of course, the right way is to write "*endptr[1] = '\0';", that was my mistake...
but what is strange is that this :
****************
/* this works ! */
int isnumber1(const char *chaine) {
char *endptr[1];
endptr[1] = '\0';
strtol(chaine,endptr,10);
return **endptr == '\0';
}
****************
..is working : just the last line changed...
How-To-Repeat:
just with "gcc -O2 -c -o isnumber.o isnumber.c", and try with other -O
optimization flags...
;-]
--
Summary: With using strtol fonction : "internal compiler error:
in propagate_one_insn, at flow.c:1642"
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: asbin at asbin dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: Debian (sid) GNU/Linux 2.6.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15539
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/15539] With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642"
2004-05-20 4:56 [Bug c/15539] New: With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642" asbin at asbin dot org
2004-05-20 5:50 ` [Bug target/15539] [3.3 Regression] " pinskia at gcc dot gnu dot org
@ 2004-05-20 5:50 ` asbin at asbin dot org
2004-06-11 22:22 ` [Bug target/15539] [3.3 Regression] " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: asbin at asbin dot org @ 2004-05-20 5:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From asbin at asbin dot org 2004-05-19 13:06 -------
Created an attachment (id=6341)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6341&action=view)
All sources, .i file, output compilation
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15539
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15539] [3.3 Regression] With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642"
2004-05-20 4:56 [Bug c/15539] New: With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642" asbin at asbin dot org
@ 2004-05-20 5:50 ` pinskia at gcc dot gnu dot org
2004-05-20 5:50 ` [Bug c/15539] " asbin at asbin dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-20 5:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-19 13:07 -------
Confirmed, of course this is all undefined code.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c |target
Ever Confirmed| |1
GCC host triplet|Debian (sid) GNU/Linux 2.6.6|
GCC target triplet| |i686-pc-linux-gnu
Keywords| |ice-on-invalid-code
Known to fail| |3.3.3 3.3.1 3.2.3
Known to work| |3.4.0 3.5.0 3.0.4
Last reconfirmed|0000-00-00 00:00:00 |2004-05-19 13:07:11
date| |
Summary|With using strtol fonction :|[3.3 Regression] With using
|"internal compiler error: in|strtol fonction : "internal
|propagate_one_insn, at |compiler error: in
|flow.c:1642" |propagate_one_insn, at
| |flow.c:1642"
Target Milestone|--- |3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15539
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15539] [3.3 Regression] With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642"
2004-05-20 4:56 [Bug c/15539] New: With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642" asbin at asbin dot org
2004-05-20 5:50 ` [Bug target/15539] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-05-20 5:50 ` [Bug c/15539] " asbin at asbin dot org
@ 2004-06-11 22:22 ` pinskia at gcc dot gnu dot org
2004-09-28 13:32 ` gdr at gcc dot gnu dot org
2005-04-30 13:41 ` gdr at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 22:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.3.4 |3.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15539
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15539] [3.3 Regression] With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642"
2004-05-20 4:56 [Bug c/15539] New: With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642" asbin at asbin dot org
` (2 preceding siblings ...)
2004-06-11 22:22 ` [Bug target/15539] [3.3 Regression] " pinskia at gcc dot gnu dot org
@ 2004-09-28 13:32 ` gdr at gcc dot gnu dot org
2005-04-30 13:41 ` gdr at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-09-28 13:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2004-09-28 13:32 -------
Adjust milestone
--
What |Removed |Added
----------------------------------------------------------------------------
Known to work|3.4.0 4.0 3.0.4 |3.4.0 4.0.0 3.0.4
Target Milestone|3.3.5 |3.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15539
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15539] [3.3 Regression] With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642"
2004-05-20 4:56 [Bug c/15539] New: With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642" asbin at asbin dot org
` (3 preceding siblings ...)
2004-09-28 13:32 ` gdr at gcc dot gnu dot org
@ 2005-04-30 13:41 ` gdr at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 13:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2005-04-30 13:40 -------
won't fix for 3.3.6. Works in 3.4.0 and higher.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|3.3.6 |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15539
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-04-30 13:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-20 4:56 [Bug c/15539] New: With using strtol fonction : "internal compiler error: in propagate_one_insn, at flow.c:1642" asbin at asbin dot org
2004-05-20 5:50 ` [Bug target/15539] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-05-20 5:50 ` [Bug c/15539] " asbin at asbin dot org
2004-06-11 22:22 ` [Bug target/15539] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-09-28 13:32 ` gdr at gcc dot gnu dot org
2005-04-30 13:41 ` gdr 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).