public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/43297]  New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c
@ 2010-03-08 21:02 edwintorok at gmail dot com
  2010-03-08 21:03 ` [Bug tree-optimization/43297] " edwintorok at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: edwintorok at gmail dot com @ 2010-03-08 21:02 UTC (permalink / raw)
  To: gcc-bugs

On sparc64 gcc 4.4.1 -O3 -fPIC breaks ClamAV's htmlnorm.c.

To reproduce bug:
$ /opt/cfarm/release/4.4.1/bin/gcc -O3 -fPIC hh.c
$ ./a.out
Aborted

On the attached testcase -O2 -fPIC breaks too (on ClamAV's htmlnorm only -O3
breaks):
$ /opt/cfarm/release/4.4.1/bin/gcc -O2 -fPIC hh.c
$ ./a.out
Aborted

Working flags/compilers:
$ /opt/cfarm/release/4.4.1/bin/gcc -O1 -fPIC hh.c
$ ./a.out
$ /opt/cfarm/release/4.4.1/bin/gcc -O2 hh.c
$ ./a.out
$ /opt/cfarm/release/4.4.1/bin/gcc -O3 hh.c
$ ./a.out
$ /opt/cfarm/release/4.3.3/bin/gcc -O3 -fPIC hh.c
$ ./a.out
$ /opt/cfarm/release/4.3.3/bin/gcc -O2 -fPIC hh.c
$ ./a.out
$ gcc -O3 -fPIC hh.c
$ ./a.out
$ gcc -O2 -fPIC hh.c
$ ./a.out

System:
Linux gcc54 2.6.18-6-sparc64 #1 Sat Dec 27 11:05:53 UTC 2008 sparc64 GNU/Linux

Buggy compiler version:
$ /opt/cfarm/release/4.4.1/bin/gcc -v
Using built-in specs.
Target: sparc64-unknown-linux-gnu
Configured with: ../gcc-4.4.1/configure --enable-languages=all,ada
--enable-__cxa_atexit --disable-nls --with-mpfr=/opt/cfarm/mpfr-2.4.1
--with-gmp=/opt/cfarm/gmp-4.2.4 --prefix=/opt/cfarm/release/4.4.1 --with-cpu=v8
Thread model: posix
gcc version 4.4.1 (GCC)

Working compilers:
$ /opt/cfarm/release/4.3.3/bin/gcc -v
Using built-in specs.
Target: sparc64-unknown-linux-gnu
Configured with: ../gcc-4.3.3/configure --prefix=/opt/cfarm/release/4.3.3
--enable-__cxa_atexit --disable-nls --enable-threads=posix
--with-mpfr=/opt/cfarm/mpfr-2.3.2 --with-cpu=v8 --enable-languages=c,ada
Thread model: posix
gcc version 4.3.3 (GCC)

$ gcc -v
Using built-in specs.
Target: sparc-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-cpu=v8 --enable-checking=release
sparc-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)


-- 
           Summary: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: edwintorok at gmail dot com
 GCC build triplet: sparc64-unknown-linux-gnu
  GCC host triplet: sparc64-unknown-linux-gnu
GCC target triplet: sparc64-unknown-linux-gnu


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


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

* [Bug tree-optimization/43297] [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
@ 2010-03-08 21:03 ` edwintorok at gmail dot com
  2010-03-08 21:10 ` [Bug tree-optimization/43297] [4.4 regression] " ebotcazou at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: edwintorok at gmail dot com @ 2010-03-08 21:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from edwintorok at gmail dot com  2010-03-08 21:03 -------
Created an attachment (id=20046)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20046&action=view)
testcase

Testcase (partially) reduced with delta. Could probably be reduced further.


-- 


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


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

* [Bug tree-optimization/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
  2010-03-08 21:03 ` [Bug tree-optimization/43297] " edwintorok at gmail dot com
@ 2010-03-08 21:10 ` ebotcazou at gcc dot gnu dot org
  2010-03-09 12:31 ` [Bug target/43297] " rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-03-08 21:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ebotcazou at gcc dot gnu dot org  2010-03-08 21:09 -------
If it works with 4.3.x then this is not a 4.3 regression.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
           Keywords|                            |wrong-code
            Summary|[4.3 regression] sparc64 -O2|[4.4 regression] -O2 -fPIC
                   |-fPIC breaks htmlnorm.c     |breaks htmlnorm.c


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


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

* [Bug target/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
  2010-03-08 21:03 ` [Bug tree-optimization/43297] " edwintorok at gmail dot com
  2010-03-08 21:10 ` [Bug tree-optimization/43297] [4.4 regression] " ebotcazou at gcc dot gnu dot org
@ 2010-03-09 12:31 ` rguenth at gcc dot gnu dot org
  2010-03-09 13:01 ` edwintorok at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-09 12:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-03-09 12:30 -------
Please test a more recent version from the 4.4 branch (and trunk if possible).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
      Known to fail|                            |4.4.1
      Known to work|                            |4.3.3
   Target Milestone|---                         |4.4.4


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


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

* [Bug target/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
                   ` (2 preceding siblings ...)
  2010-03-09 12:31 ` [Bug target/43297] " rguenth at gcc dot gnu dot org
@ 2010-03-09 13:01 ` edwintorok at gmail dot com
  2010-04-30  8:58 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: edwintorok at gmail dot com @ 2010-03-09 13:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from edwintorok at gmail dot com  2010-03-09 13:01 -------
(In reply to comment #3)
> Please test a more recent version from the 4.4 branch (and trunk if possible).
> 

Ok, I found gcc 4.4.3 on gcc200 and it still produces wrong code:
$ /opt/cfarm/release/4.4.3/bin/gcc -v
Using built-in specs.
Target: sparc64-unknown-linux-gnu
Configured with: ../gcc-4.4.3/configure --prefix=/opt/cfarm/release/4.4.3
--disable-werror --enable-languages=c,c++,fortran,ada --enable-__cxa_atexit
--disable-nls --enable-threads=posix --with-gmp=/opt/cfarm/gmp-4.2.4
--with-mpfr=/opt/cfarm/mpfr-2.4.2 --with-cpu=v8 --disable-multilib
Thread model: posix
gcc version 4.4.3 (GCC)

$ /opt/cfarm/release/4.4.3/bin/gcc -O2 -fPIC hh.c
$ ./a.out
Aborted

It seems to be a problem only when creating 32-bit code, -m64 works fine:
$ /opt/cfarm/release/4.4.3-64/bin/gcc -O2 -fPIC -m64 hh.c
$./a.out
And -m32 aborts of course:
$ /opt/cfarm/release/4.4.3-64/bin/gcc -O2 -fPIC -m32 hh.c
$./a.out

/opt/cfarm/release/4.4.3-64/bin/gcc -v
Using built-in specs.
Target: sparc64-unknown-linux-gnu
Configured with: ../gcc-4.4.3/configure --prefix=/opt/cfarm/release/4.4.3-64
--disable-werror --enable-languages=c,c++,fortran,ada --enable-__cxa_atexit
--disable-nls --enable-threads=posix --with-gmp=/opt/cfarm/gmp-4.2.4-64
--with-mpfr=/opt/cfarm/mpfr-2.4.2-64
Thread model: posix
gcc version 4.4.3 (GCC)
Aborted


-- 

edwintorok at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.4.1                       |4.4.3


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


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

* [Bug target/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
                   ` (3 preceding siblings ...)
  2010-03-09 13:01 ` edwintorok at gmail dot com
@ 2010-04-30  8:58 ` jakub at gcc dot gnu dot org
  2010-07-09 10:25 ` ebotcazou at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-30  8:58 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.4                       |4.4.5


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


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

* [Bug target/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
                   ` (4 preceding siblings ...)
  2010-04-30  8:58 ` jakub at gcc dot gnu dot org
@ 2010-07-09 10:25 ` ebotcazou at gcc dot gnu dot org
  2010-09-18  8:48 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-09 10:25 UTC (permalink / raw)
  To: gcc-bugs



-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-09 10:25:26
               date|                            |


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


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

* [Bug target/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
                   ` (5 preceding siblings ...)
  2010-07-09 10:25 ` ebotcazou at gcc dot gnu dot org
@ 2010-09-18  8:48 ` ebotcazou at gcc dot gnu dot org
  2010-09-19 12:08 ` ebotcazou at gcc dot gnu dot org
  2010-09-19 12:17 ` ebotcazou at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-09-18  8:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ebotcazou at gcc dot gnu dot org  2010-09-18 08:48 -------
Investigating.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|ebotcazou at gcc dot gnu dot|
                   |org                         |
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-07-09 10:25:26         |2010-09-18 08:48:04
               date|                            |


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


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

* [Bug target/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
                   ` (6 preceding siblings ...)
  2010-09-18  8:48 ` ebotcazou at gcc dot gnu dot org
@ 2010-09-19 12:08 ` ebotcazou at gcc dot gnu dot org
  2010-09-19 12:17 ` ebotcazou at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-09-19 12:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ebotcazou at gcc dot gnu dot org  2010-09-19 12:07 -------
Created an attachment (id=21834)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21834&action=view)
More reduced testcase


-- 


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


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

* [Bug target/43297] [4.4 regression] -O2 -fPIC breaks htmlnorm.c
  2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
                   ` (7 preceding siblings ...)
  2010-09-19 12:08 ` ebotcazou at gcc dot gnu dot org
@ 2010-09-19 12:17 ` ebotcazou at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-09-19 12:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ebotcazou at gcc dot gnu dot org  2010-09-19 12:16 -------
Fixed in latest 4.4.x snapshot:

ebotcazou@grobluk:~$ gcc -v
Using built-in specs.
Target: sparc64-unknown-linux-gnu
Configured with: /home/ebotcazou/src-4.4/configure
--prefix=/home/ebotcazou/install-4.4 --enable-languages=c --with-cpu=v8
Thread model: posix
gcc version 4.4.5 20100914 (prerelease) (GCC)


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|4.3.3                       |4.3.3 4.5.1 4.6.0
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2010-09-19 12:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 21:02 [Bug tree-optimization/43297] New: [4.3 regression] sparc64 -O2 -fPIC breaks htmlnorm.c edwintorok at gmail dot com
2010-03-08 21:03 ` [Bug tree-optimization/43297] " edwintorok at gmail dot com
2010-03-08 21:10 ` [Bug tree-optimization/43297] [4.4 regression] " ebotcazou at gcc dot gnu dot org
2010-03-09 12:31 ` [Bug target/43297] " rguenth at gcc dot gnu dot org
2010-03-09 13:01 ` edwintorok at gmail dot com
2010-04-30  8:58 ` jakub at gcc dot gnu dot org
2010-07-09 10:25 ` ebotcazou at gcc dot gnu dot org
2010-09-18  8:48 ` ebotcazou at gcc dot gnu dot org
2010-09-19 12:08 ` ebotcazou at gcc dot gnu dot org
2010-09-19 12:17 ` ebotcazou 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).