public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/13862] New: ICE while optimizing asm (Regression)
@ 2004-01-26 4:28 gcc-bugzilla at gcc dot gnu dot org
2004-01-26 4:44 ` [Bug optimization/13862] [3.5 Regression] ICE while optimizing asm pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-01-26 4:28 UTC (permalink / raw)
To: gcc-bugs
The following code, extracted from fame version 0.9, triggers an ice when
optimization is enabled. Since gcc 3.3.1 groks this code without a problem it
seems that this is a regression.
Environment:
System: Linux kiste 2.4.21-166-default #1 Thu Dec 18 18:23:14 UTC 2003 i686 i686 i386 GNU/Linux
Architecture: i686
SuSE 9.0
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug
How-To-Repeat:
crash.c:
typedef struct _fame_syntax_t_ {
} fame_syntax_t;
typedef struct _fame_bitbuffer_t_
{
unsigned char * base;
unsigned char * data;
unsigned long shift;
} fame_bitbuffer_t;
#define fast_bitbuffer_write(data, shift, c, l) \
{ \
int d; \
\
asm("add %1, %%ecx\n" /* ecx = shift + length */ \
"shrd %%cl, %2, %3\n" /* adjust code to fit in */ \
"shr %%cl, %2\n" /* adjust code to fit in */ \
"mov %%ecx, %1\n" /* shift += length */ \
"bswap %2\n" /* reverse byte order of code */ \
"shr $5, %%ecx\n" /* get dword increment */ \
"or %2, (%0)\n" /* put first 32 bits */ \
"bswap %3\n" /* reverse byte order of code */ \
"lea (%0, %%ecx, 4), %0\n" /* data += (ecx>32) */ \
"andl $31, %1\n" /* mask shift */ \
"orl %3, (%0)\n" /* put last 32 bits */ \
: "=r"(data), "=r"(shift), "=a"(d), "=d"(d), "=c"(d) \
: "0"(data), "1"(shift), "2"((unsigned long) c), "3"(0), "c"((unsigned long) l) \
: "memory"); \
}
#define bitbuffer_write(bb, c, l) fast_bitbuffer_write((bb)->data, (bb)->shift, c, l)
typedef enum { frame_type_I,
frame_type_P } frame_type_t;
typedef struct _fame_syntax_mpeg1_t_ {
fame_bitbuffer_t buffer;
frame_type_t frame_type;
} fame_syntax_mpeg1_t;
#define FAME_SYNTAX_MPEG1(x) ((fame_syntax_mpeg1_t *) x)
void mpeg1_start_picture(fame_syntax_t *syntax)
{
fame_syntax_mpeg1_t *syntax_mpeg1 = FAME_SYNTAX_MPEG1(syntax);
bitbuffer_write(&syntax_mpeg1->buffer, 0xFFFF, 16);
switch(syntax_mpeg1->frame_type) {
case frame_type_I:
bitbuffer_write(&syntax_mpeg1->buffer, 0, 1);
break;
case frame_type_P:
bitbuffer_write(&syntax_mpeg1->buffer, 0, 1);
break;
}
}
gcc 3.4
gcc -v -O -c crash.c -save-temps
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug
Thread model: posix
gcc version 3.5.0 20040125 (experimental)
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.5.0/cc1 -E -quiet -v crash.c -mtune=pentiumpro -O -o crash.i
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0/include
/usr/include
End of search list.
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.5.0/cc1 -fpreprocessed crash.i -quiet -dumpbase crash.c -mtune=pentiumpro -auxbase crash -O -version -o crash.s
GNU C version 3.5.0 20040125 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.5.0 20040125 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
crash.c: In function `mpeg1_start_picture':
crash.c:59: internal compiler error: in cselib_record_set, at cselib.c:1196
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
gcc 3.3.1
/usr/bin/gcc -v -O -c crash.c -save-temps
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.1/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.1 (SuSE Linux)
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/cc1 -E -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 crash.c -O crash.i
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/include
/usr/i586-suse-linux/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/cc1 -fpreprocessed crash.i -quiet -dumpbase crash.c -auxbase crash -O -version -o crash.s
GNU C version 3.3.1 (SuSE Linux) (i586-suse-linux)
compiled by GNU C version 3.3.1 (SuSE Linux).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../../i586-suse-linux/bin/as -V -Qy -o crash.o crash.s
GNU assembler version 2.14.90.0.5 (i586-suse-linux) using BFD version 2.14.90.0.5 20030722 (SuSE Linux)
--
Summary: ICE while optimizing asm (Regression)
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: poschmid at lbl dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
@ 2004-01-26 4:44 ` pinskia at gcc dot gnu dot org
2004-02-12 19:08 ` [Bug optimization/13862] [3.4?/3.5 " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-26 4:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-26 04:44 -------
Confirmed, a regression.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Known to work| |3.3
Last reconfirmed|0000-00-00 00:00:00 |2004-01-26 04:44:33
date| |
Summary|ICE while optimizing asm |[3.5 Regression] ICE while
|(Regression) |optimizing asm
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
2004-01-26 4:44 ` [Bug optimization/13862] [3.5 Regression] ICE while optimizing asm pinskia at gcc dot gnu dot org
@ 2004-02-12 19:08 ` pinskia at gcc dot gnu dot org
2004-03-03 7:24 ` rth at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-12 19:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-12 19:08 -------
I think this is also 3.4.0 regression too.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-01-26 04:44:33 |2004-02-12 19:08:28
date| |
Summary|[3.5 Regression] ICE while |[3.4?/3.5 Regression] ICE
|optimizing asm |while optimizing asm
Target Milestone|3.5.0 |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
2004-01-26 4:44 ` [Bug optimization/13862] [3.5 Regression] ICE while optimizing asm pinskia at gcc dot gnu dot org
2004-02-12 19:08 ` [Bug optimization/13862] [3.4?/3.5 " pinskia at gcc dot gnu dot org
@ 2004-03-03 7:24 ` rth at gcc dot gnu dot org
2004-03-03 7:29 ` rth at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-03-03 7:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-03-03 07:24 -------
Testing a patch.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rth at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-03-03 7:24 ` rth at gcc dot gnu dot org
@ 2004-03-03 7:29 ` rth at gcc dot gnu dot org
2004-03-03 7:30 ` rth at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-03-03 7:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-03-03 07:29 -------
*** Bug 14345 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at ds14 dot agh dot
| |edu dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-03-03 7:29 ` rth at gcc dot gnu dot org
@ 2004-03-03 7:30 ` rth at gcc dot gnu dot org
2004-03-03 7:32 ` rth at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-03-03 7:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-03-03 07:30 -------
*** Bug 14269 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jfranka at sfu dot ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-03-03 7:30 ` rth at gcc dot gnu dot org
@ 2004-03-03 7:32 ` rth at gcc dot gnu dot org
2004-03-03 18:31 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-03-03 7:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-03-03 07:32 -------
*** Bug 13951 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ak at muc dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-03-03 7:32 ` rth at gcc dot gnu dot org
@ 2004-03-03 18:31 ` cvs-commit at gcc dot gnu dot org
2004-03-03 18:37 ` cvs-commit at gcc dot gnu dot org
2004-03-03 18:59 ` rth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-03 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-03 18:31 -------
Subject: Bug 13862
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rth@gcc.gnu.org 2004-03-03 18:31:36
Modified files:
gcc : ChangeLog cselib.c
Added files:
gcc/testsuite/gcc.dg: i386-asm-2.c
Log message:
PR opt/13862
* cselib.c (cselib_record_sets): Don't record multiple sets in
asm insns.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3020&r2=2.3021
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cselib.c.diff?cvsroot=gcc&r1=1.39&r2=1.40
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/i386-asm-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-03-03 18:31 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-03 18:37 ` cvs-commit at gcc dot gnu dot org
2004-03-03 18:59 ` rth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-03 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-03 18:37 -------
Subject: Bug 13862
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: rth@gcc.gnu.org 2004-03-03 18:37:01
Modified files:
gcc : ChangeLog cselib.c
Added files:
gcc/testsuite/gcc.dg: i386-asm-2.c
Log message:
PR opt/13862
* cselib.c (cselib_record_sets): Don't record multiple sets in
asm insns.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.283&r2=2.2326.2.284
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cselib.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.32.4.4&r2=1.32.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/i386-asm-2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/13862] [3.4?/3.5 Regression] ICE while optimizing asm
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-03-03 18:37 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-03 18:59 ` rth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-03-03 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-03-03 18:59 -------
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00302.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13862
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-03-03 18:59 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-26 4:28 [Bug optimization/13862] New: ICE while optimizing asm (Regression) gcc-bugzilla at gcc dot gnu dot org
2004-01-26 4:44 ` [Bug optimization/13862] [3.5 Regression] ICE while optimizing asm pinskia at gcc dot gnu dot org
2004-02-12 19:08 ` [Bug optimization/13862] [3.4?/3.5 " pinskia at gcc dot gnu dot org
2004-03-03 7:24 ` rth at gcc dot gnu dot org
2004-03-03 7:29 ` rth at gcc dot gnu dot org
2004-03-03 7:30 ` rth at gcc dot gnu dot org
2004-03-03 7:32 ` rth at gcc dot gnu dot org
2004-03-03 18:31 ` cvs-commit at gcc dot gnu dot org
2004-03-03 18:37 ` cvs-commit at gcc dot gnu dot org
2004-03-03 18:59 ` rth 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).