public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28629]  New: Segfault with --march=pentium-m -O2 when compiling faac
@ 2006-08-07  8:13 zuxy dot meng at gmail dot com
  2006-08-07  8:14 ` [Bug c/28629] " zuxy dot meng at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zuxy dot meng at gmail dot com @ 2006-08-07  8:13 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

Error message:

filtbank.c: ÔÚº¯Êý ¡®MDCT¡¯ ÖУº
filtbank.c:498: ±àÒëÆ÷ÄÚ²¿´íÎó£ºSegmentation fault
ÇëÌá½»Ò»·ÝÍêÕûµÄ´íÎ󱨸棬
ÈçÓпÉÄÜÇ븽ÉϾ­Ô¤´¦ÀíºóµÄÔ´Îļþ¡£
¾ßÌå²½ÖèÇë²Î¼û <URL:http://gcc.gnu.org/bugs.html>¡£

Output from gcc -v:

´Ó c:/mingw/bin/../lib/gcc/mingw32/4.1.1/specs ¶ÁÈ¡ specs
Ä¿±ê£ºmingw32
ÅäÖÃΪ£º../gcc-4.1.1/configure --prefix=/mingw --enable-threads --host=mingw32
-
-target=mingw32 --disable-shared --disable-win32-registry
--enable-cxx-flags=-fo
mit-frame-pointer -mfpmath=sse,387 -march=pentium-m
Ïß³ÌÄ£ÐÍ£ºwin32
gcc °æ±¾ 4.1.1

It only appears when using both --march=pentium-m and optimization level higher
than or equal to -O2.


-- 
           Summary: Segfault with --march=pentium-m -O2 when compiling faac
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zuxy dot meng at gmail dot com
 GCC build triplet: mingw32
  GCC host triplet: mingw32
GCC target triplet: mingw32


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


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

* [Bug c/28629] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
@ 2006-08-07  8:14 ` zuxy dot meng at gmail dot com
  2006-08-07  8:26 ` zuxy dot meng at gmail dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zuxy dot meng at gmail dot com @ 2006-08-07  8:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zuxy dot meng at gmail dot com  2006-08-07 08:14 -------
Created an attachment (id=12033)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12033&action=view)
Preprocessed file


-- 


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


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

* [Bug c/28629] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
  2006-08-07  8:14 ` [Bug c/28629] " zuxy dot meng at gmail dot com
@ 2006-08-07  8:26 ` zuxy dot meng at gmail dot com
  2006-08-07  8:40 ` [Bug target/28629] " rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zuxy dot meng at gmail dot com @ 2006-08-07  8:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from zuxy dot meng at gmail dot com  2006-08-07 08:26 -------
(In reply to comment #0)

> It only appears when using both --march=pentium-m and optimization level higher
> than or equal to -O2.

Sorry, forgot to mention that I use -mfpmath=sse,387 in my spec file. So, more
precisely, the bug can be reproduced with a combination of --march=pentium-m
(or --march=pentium3 -msse2), -mfpmath=sse,387, and any optimization level high
than or equal to -O2.


-- 


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


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

* [Bug target/28629] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
  2006-08-07  8:14 ` [Bug c/28629] " zuxy dot meng at gmail dot com
  2006-08-07  8:26 ` zuxy dot meng at gmail dot com
@ 2006-08-07  8:40 ` rguenth at gcc dot gnu dot org
  2006-08-07  9:00 ` bonzini at gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-08-07  8:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2006-08-07 08:40 -------
doesn't reproduce on i686-linux.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target


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


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

* [Bug target/28629] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (2 preceding siblings ...)
  2006-08-07  8:40 ` [Bug target/28629] " rguenth at gcc dot gnu dot org
@ 2006-08-07  9:00 ` bonzini at gnu dot org
  2006-08-07  9:28 ` zuxy dot meng at gmail dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2006-08-07  9:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from bonzini at gnu dot org  2006-08-07 09:00 -------
Please disable your locale momentarily, and copy/paste the output of 

gcc -### -O2 -march=pentium-m filtbank.i

or something like that.


-- 


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


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

* [Bug target/28629] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (3 preceding siblings ...)
  2006-08-07  9:00 ` bonzini at gnu dot org
@ 2006-08-07  9:28 ` zuxy dot meng at gmail dot com
  2006-08-07 21:04 ` dannysmith at users dot sourceforge dot net
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zuxy dot meng at gmail dot com @ 2006-08-07  9:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from zuxy dot meng at gmail dot com  2006-08-07 09:28 -------
(In reply to comment #4)
> Please disable your locale momentarily, and copy/paste the output of 
> gcc -### -O2 -march=pentium-m filtbank.i
> or something like that.

C:\MSYS\source\faac\libfaac>gcc -### -O2 -march=pentium-m -mfpmath=sse,387
filtbank.i
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.1.1/configure --prefix=/mingw --enable-threads
--host=mingw32 --target=mingw32 --disable-shared --disable-win32-registry
--enable-cxx-flags=-fomit-frame-pointer -mfpmath=sse,387 -march=pentium-m
Thread model: win32
gcc version 4.1.1
 "c:/mingw/bin/../libexec/gcc/mingw32/4.1.1/cc1.exe" "-fpreprocessed"
"filtbank.i" "-quiet" "-dumpbase" "filtbank.i" "-march=pentium-m"
"-mfpmath=sse,387" "-auxbase" "filtbank" "-O2" "-o"
"C:\\DOCUME~1\\jimeng\\LOCALS~1\\Temp/cckHr6En.s"
"c:/mingw/bin/../lib/gcc/mingw32/4.1.1/../../../../mingw32/bin/as.exe" "-o"
"C:\\DOCUME~1\\jimeng\\LOCALS~1\\Temp/ccYVP0yD.o"
"C:\\DOCUME~1\\jimeng\\LOCALS~1\\Temp/cckHr6En.s"
"c:/mingw/bin/../libexec/gcc/mingw32/4.1.1/collect2.exe" "-Bdynamic"
"c:/mingw/bin/../lib/gcc/mingw32/4.1.1/../../../crt2.o"
"-Lc:/mingw/bin/../lib/gcc/mingw32/4.1.1" "-Lc:/mingw/bin/../lib/gcc"
"-Lc:/MinGW/lib/gcc/mingw32/4.1.1"
"-Lc:/mingw/bin/../lib/gcc/mingw32/4.1.1/../../../../mingw32/lib"
"-Lc:/MinGW/lib/gcc/mingw32/4.1.1/../../../../mingw32/lib"
"-Lc:/mingw/bin/../lib/gcc/mingw32/4.1.1/../../.."
"-Lc:/MinGW/lib/gcc/mingw32/4.1.1/../../.." "-L/mingw/lib"
"C:\\DOCUME~1\\jimeng\\LOCALS~1\\Temp/ccYVP0yD.o" "-lmingw32" "-lgcc"
"-lmoldname" "-lmingwex" "-lmsvcrt" "-luser32" "-lkernel32" "-ladvapi32"
"-shell32" "-lmingw32" "-lgcc" "-lmoldname" "-lmingwex" "-lmsvcrt"


-- 


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


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

* [Bug target/28629] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (4 preceding siblings ...)
  2006-08-07  9:28 ` zuxy dot meng at gmail dot com
@ 2006-08-07 21:04 ` dannysmith at users dot sourceforge dot net
  2007-08-24 12:53 ` [Bug target/28629] [4.1] " fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2006-08-07 21:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dannysmith at users dot sourceforge dot net  2006-08-07 21:04 -------
(In reply to comment #2)
> (In reply to comment #0)

> precisely, the bug can be reproduced with a combination of --march=pentium-m
> (or --march=pentium3 -msse2), -mfpmath=sse,387, and any optimization level high
> than or equal to -O2.

gcc  -c  -O2 -march=pentium-m -mfpmath=sse,387 filtbank.i
compiles without error on  trunk with native mingw32
Target: mingw32
Configured with: ../gcc/configure --with-gcc --enable-libgomp --host=mingw32
--build=mingw32 --target=mingw32 --with-cpu=pentium2 --disable-werror
--prefix=/mingw --enable-threads --disable-nls
--enable-languages=c,c++,objc,fortran --disable-win32-registry
--disable-sjlj-exceptions
Thread model: win32
gcc version 4.2.0 20060803 (experimental)


-- 


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


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

* [Bug target/28629] [4.1] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (5 preceding siblings ...)
  2006-08-07 21:04 ` dannysmith at users dot sourceforge dot net
@ 2007-08-24 12:53 ` fxcoudert at gcc dot gnu dot org
  2007-08-25  8:22 ` zuxy dot meng at gmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-24 12:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from fxcoudert at gcc dot gnu dot org  2007-08-24 12:53 -------
Also works on mainline (4.3).


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.2.0 4.3.0
            Summary|Segfault with --            |[4.1] Segfault with --
                   |march=pentium-m -O2 when    |march=pentium-m -O2 when
                   |compiling faac              |compiling faac


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


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

* [Bug target/28629] [4.1] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (6 preceding siblings ...)
  2007-08-24 12:53 ` [Bug target/28629] [4.1] " fxcoudert at gcc dot gnu dot org
@ 2007-08-25  8:22 ` zuxy dot meng at gmail dot com
  2007-08-25 17:14 ` zuxy dot meng at gmail dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zuxy dot meng at gmail dot com @ 2007-08-25  8:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from zuxy dot meng at gmail dot com  2007-08-25 08:21 -------
Is it possible that the reason may be that I compiled gcc with additional
CFLAGS? I added -march=pentium-m -ftree-vectorize -mfpmath=sse,387 and
-fomit-frame-pointer in addition to -O2.


-- 


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


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

* [Bug target/28629] [4.1] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (7 preceding siblings ...)
  2007-08-25  8:22 ` zuxy dot meng at gmail dot com
@ 2007-08-25 17:14 ` zuxy dot meng at gmail dot com
  2007-08-26  7:49 ` dorit at gcc dot gnu dot org
  2008-03-27 22:08 ` [Bug target/28629] [4.1 Regression] " rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: zuxy dot meng at gmail dot com @ 2007-08-25 17:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from zuxy dot meng at gmail dot com  2007-08-25 17:14 -------
I've confirmed that the problem is caused by '-ftree-vectorize' passed to
compile gcc. More precisely, a 'movdqa' instruction in constraint_operands()
accessed an unaligned memory.


-- 


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


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

* [Bug target/28629] [4.1] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (8 preceding siblings ...)
  2007-08-25 17:14 ` zuxy dot meng at gmail dot com
@ 2007-08-26  7:49 ` dorit at gcc dot gnu dot org
  2008-03-27 22:08 ` [Bug target/28629] [4.1 Regression] " rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dorit at gcc dot gnu dot org @ 2007-08-26  7:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dorit at gcc dot gnu dot org  2007-08-26 07:49 -------
(In reply to comment #9)
> I've confirmed that the problem is caused by '-ftree-vectorize' passed to
> compile gcc. More precisely, a 'movdqa' instruction in constraint_operands()
> accessed an unaligned memory.

since this is reported to work on 4.2 and 4.3, I wonder if it's related to the
fix for PR25413 (which was committed to 4.2 and 4.3).


-- 


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


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

* [Bug target/28629] [4.1 Regression] Segfault with --march=pentium-m -O2 when compiling faac
  2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
                   ` (9 preceding siblings ...)
  2007-08-26  7:49 ` dorit at gcc dot gnu dot org
@ 2008-03-27 22:08 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-27 22:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2008-03-27 22:07 -------
Fixed in 4.2.0.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to fail|                            |4.1.3
         Resolution|                            |FIXED
            Summary|[4.1] Segfault with --      |[4.1 Regression] Segfault
                   |march=pentium-m -O2 when    |with --march=pentium-m -O2
                   |compiling faac              |when compiling faac
   Target Milestone|---                         |4.2.0


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


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

end of thread, other threads:[~2008-03-27 22:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07  8:13 [Bug c/28629] New: Segfault with --march=pentium-m -O2 when compiling faac zuxy dot meng at gmail dot com
2006-08-07  8:14 ` [Bug c/28629] " zuxy dot meng at gmail dot com
2006-08-07  8:26 ` zuxy dot meng at gmail dot com
2006-08-07  8:40 ` [Bug target/28629] " rguenth at gcc dot gnu dot org
2006-08-07  9:00 ` bonzini at gnu dot org
2006-08-07  9:28 ` zuxy dot meng at gmail dot com
2006-08-07 21:04 ` dannysmith at users dot sourceforge dot net
2007-08-24 12:53 ` [Bug target/28629] [4.1] " fxcoudert at gcc dot gnu dot org
2007-08-25  8:22 ` zuxy dot meng at gmail dot com
2007-08-25 17:14 ` zuxy dot meng at gmail dot com
2007-08-26  7:49 ` dorit at gcc dot gnu dot org
2008-03-27 22:08 ` [Bug target/28629] [4.1 Regression] " rguenth 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).