public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC
@ 2012-11-07 21:10 zsojka at seznam dot cz
  2012-11-08 16:18 ` [Bug tree-optimization/55236] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2012-11-07 21:10 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55236
           Summary: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c
                    FAILs with -fPIC
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 28631
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28631
testcase (gcc.c-torture/execute/pr22493-1.c)

Output:
$ gcc -O2 -fPIC -fwrapv testcase.c
$ ./a.out 
Aborted

The problem seems to be that f() is optimised just to abort().
In the -fPIC case, f() is called, and the program aborts.
Without -fPIC, f() is not called, so the program doesn't abort - though the
body of f() is reduced to just abort() as well.

Tested revisions:
r193182 - FAIL
4.7 r191640 - OK


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

* [Bug tree-optimization/55236] [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC
  2012-11-07 21:10 [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC zsojka at seznam dot cz
@ 2012-11-08 16:18 ` jakub at gcc dot gnu.org
  2012-11-17 22:00 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-08 16:18 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-11-08
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-08 16:18:08 UTC ---
Created attachment 28636
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28636
gcc48-pr55236.patch

Started with my inter-bb range test optimization, but as the attached testcase
shows, if written in a single stmt, even gcc 3.4 miscompiles it.


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

* [Bug tree-optimization/55236] [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC
  2012-11-07 21:10 [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC zsojka at seznam dot cz
  2012-11-08 16:18 ` [Bug tree-optimization/55236] " jakub at gcc dot gnu.org
@ 2012-11-17 22:00 ` jakub at gcc dot gnu.org
  2012-11-19  9:39 ` [Bug tree-optimization/55236] " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-17 22:00 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-17 22:00:37 UTC ---
Author: jakub
Date: Sat Nov 17 22:00:32 2012
New Revision: 193591

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193591
Log:
    PR tree-optimization/55236
    * fold-const.c (make_range_step) <case NEGATE_EXPR>: For -fwrapv
    and signed ARG0_TYPE, force low and high to be non-NULL.

    * gcc.dg/pr55236.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr55236.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/55236] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC
  2012-11-07 21:10 [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC zsojka at seznam dot cz
  2012-11-08 16:18 ` [Bug tree-optimization/55236] " jakub at gcc dot gnu.org
  2012-11-17 22:00 ` jakub at gcc dot gnu.org
@ 2012-11-19  9:39 ` jakub at gcc dot gnu.org
  2013-01-07 10:07 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-19  9:39 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0
            Summary|[4.8 Regression]            |gcc.c-torture/execute/pr224
                   |gcc.c-torture/execute/pr224 |93-1.c FAILs with -fPIC
                   |93-1.c FAILs with -fPIC     |

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-19 09:38:45 UTC ---
Fixed on the trunk so far, the branches still miscompile the testcase.


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

* [Bug tree-optimization/55236] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC
  2012-11-07 21:10 [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-11-19  9:39 ` [Bug tree-optimization/55236] " jakub at gcc dot gnu.org
@ 2013-01-07 10:07 ` rguenth at gcc dot gnu.org
  2013-02-01 13:59 ` jakub at gcc dot gnu.org
  2013-02-01 14:24 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-07 10:07 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xi.wang at gmail dot com

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-07 10:06:31 UTC ---
*** Bug 55883 has been marked as a duplicate of this bug. ***


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

* [Bug tree-optimization/55236] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC
  2012-11-07 21:10 [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2013-01-07 10:07 ` rguenth at gcc dot gnu.org
@ 2013-02-01 13:59 ` jakub at gcc dot gnu.org
  2013-02-01 14:24 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-01 13:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 13:58:58 UTC ---
Author: jakub
Date: Fri Feb  1 13:58:55 2013
New Revision: 195649

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195649
Log:
    Backported from mainline
    2012-11-17  Jakub Jelinek  <jakub@redhat.com>

    PR tree-optimization/55236
    * fold-const.c (make_range_step) <case NEGATE_EXPR>: For -fwrapv
    and signed ARG0_TYPE, force low and high to be non-NULL.

    * gcc.dg/pr55236.c: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/pr55236.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/fold-const.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/55236] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC
  2012-11-07 21:10 [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2013-02-01 13:59 ` jakub at gcc dot gnu.org
@ 2013-02-01 14:24 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-01 14:24 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 14:23:57 UTC ---
Fixed.


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

end of thread, other threads:[~2013-02-01 14:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-07 21:10 [Bug tree-optimization/55236] New: [4.8 Regression] gcc.c-torture/execute/pr22493-1.c FAILs with -fPIC zsojka at seznam dot cz
2012-11-08 16:18 ` [Bug tree-optimization/55236] " jakub at gcc dot gnu.org
2012-11-17 22:00 ` jakub at gcc dot gnu.org
2012-11-19  9:39 ` [Bug tree-optimization/55236] " jakub at gcc dot gnu.org
2013-01-07 10:07 ` rguenth at gcc dot gnu.org
2013-02-01 13:59 ` jakub at gcc dot gnu.org
2013-02-01 14:24 ` jakub at gcc dot gnu.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).