public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
@ 2012-11-14 21:54 zsojka at seznam dot cz
  2012-11-14 22:16 ` [Bug middle-end/55331] " dominiq at lps dot ens.fr
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2012-11-14 21:54 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55331
           Summary: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in
                    substitute_and_fold with -O2 -fno-tree-fre
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 28691
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28691
autoreduced testcase

Compiler output:
$ gcc -O2 -fno-tree-fre testcase-min7.ii -wrapper
valgrind,-q,--num-callers=40,--track-origins=yes -w
==4620== Invalid read of size 1
==4620==    at 0xCEBDBD: substitute_and_fold(tree_node* (*)(tree_node*), bool
(*)(gimple_stmt_iterator*), bool) (gimple.h:1146)
==4620==    by 0xC857C2: execute_copy_prop() (tree-ssa-copy.c:772)
==4620==    by 0xADBB7A: execute_one_pass(opt_pass*) (passes.c:2339)
==4620==    by 0xADBF94: execute_pass_list(opt_pass*) (passes.c:2400)
==4620==    by 0xADBFA6: execute_pass_list(opt_pass*) (passes.c:2401)
==4620==    by 0xADBFA6: execute_pass_list(opt_pass*) (passes.c:2401)
==4620==    by 0x85E4F1: expand_function(cgraph_node*) (cgraphunit.c:1643)
==4620==    by 0x8602A6: compile() (cgraphunit.c:1747)
==4620==    by 0x860949: finalize_compilation_unit() (cgraphunit.c:2122)
==4620==    by 0x67717E: cp_write_global_declarations() (decl2.c:4287)
==4620==    by 0xBC527C: compile_file() (toplev.c:559)
==4620==    by 0xBC7139: toplev_main(int, char**) (toplev.c:1881)
==4620==    by 0x5A364BC: (below main) (in /lib64/libc-2.15.so)
==4620==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==4620== 
testcase-min7.ii: In function 'void test01()':
testcase-min7.ii:253:1: internal compiler error: Segmentation fault
 test01 ()
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Tested revisions:
r193495 - crash
4.7 r191640 - crash
4.6 r191640 - crash
4.5 r191640 - OK


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

* [Bug middle-end/55331] [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
@ 2012-11-14 22:16 ` dominiq at lps dot ens.fr
  2012-11-15 11:52 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-11-14 22:16 UTC (permalink / raw)
  To: gcc-bugs


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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-14
     Ever Confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-11-14 22:16:00 UTC ---
Confirmed:
4.6.0 2011-01-20 revision 169049 is OK
4.7.0 2011-04-14 revision 172429 gives an ICE.


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

* [Bug middle-end/55331] [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
  2012-11-14 22:16 ` [Bug middle-end/55331] " dominiq at lps dot ens.fr
@ 2012-11-15 11:52 ` jakub at gcc dot gnu.org
  2012-11-15 12:00 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-15 11:52 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-15 11:52:43 UTC ---
Hand-reduced testcase for -O2 -fno-tree-fre

struct A {};

void
foo (A *p, bool x)
{
  A a;
  char *e = (char *) (&a + 1);
  if (x)
    __builtin_memmove (p, &a, e - (char *) &a);
}


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

* [Bug middle-end/55331] [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
  2012-11-14 22:16 ` [Bug middle-end/55331] " dominiq at lps dot ens.fr
  2012-11-15 11:52 ` jakub at gcc dot gnu.org
@ 2012-11-15 12:00 ` jakub at gcc dot gnu.org
  2012-11-15 12:18 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-15 12:00 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-15 12:00:21 UTC ---
Created attachment 28697
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28697
gcc48-pr55331.patch

Untested fix.


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

* [Bug middle-end/55331] [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-11-15 12:00 ` jakub at gcc dot gnu.org
@ 2012-11-15 12:18 ` jakub at gcc dot gnu.org
  2012-11-27  9:20 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-15 12:18 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.4


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

* [Bug middle-end/55331] [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2012-11-15 12:18 ` jakub at gcc dot gnu.org
@ 2012-11-27  9:20 ` rguenth at gcc dot gnu.org
  2012-11-27  9:23 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-11-27  9:20 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2012-11-27 09:20:07 UTC ---
Author: rguenth
Date: Tue Nov 27 09:20:02 2012
New Revision: 193839

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193839
Log:
2012-11-27  Richard Biener  <rguenther@suse.de>

    PR middle-end/55331
    * gimple-fold.c (gimplify_and_update_call_from_tree): Replace
    stmt with a NOP instead of removing it.

    * g++.dg/opt/pr55331.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/opt/pr55331.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-fold.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/55331] [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2012-11-27  9:20 ` rguenth at gcc dot gnu.org
@ 2012-11-27  9:23 ` rguenth at gcc dot gnu.org
  2012-11-27 10:14 ` [Bug middle-end/55331] [4.6 " rguenth at gcc dot gnu.org
  2013-04-12 16:29 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-11-27  9:23 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2012-11-27 09:23:19 UTC ---
Author: rguenth
Date: Tue Nov 27 09:23:15 2012
New Revision: 193840

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193840
Log:
2012-11-27  Richard Biener  <rguenther@suse.de>

    PR middle-end/55331
    * gimple-fold.c (gimplify_and_update_call_from_tree): Replace
    stmt with a NOP instead of removing it.

    * g++.dg/opt/pr55331.C: New testcase.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/opt/pr55331.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/gimple-fold.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/55331] [4.6 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2012-11-27  9:23 ` rguenth at gcc dot gnu.org
@ 2012-11-27 10:14 ` rguenth at gcc dot gnu.org
  2013-04-12 16:29 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-11-27 10:14 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.3, 4.8.0
            Summary|[4.6/4.7/4.8 Regression]    |[4.6 Regression] ICE:
                   |ICE: SIGSEGV in             |SIGSEGV in
                   |substitute_and_fold with    |substitute_and_fold with
                   |-O2 -fno-tree-fre           |-O2 -fno-tree-fre
      Known to fail|4.7.3, 4.8.0                |4.7.2

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2012-11-27 10:14:21 UTC ---
Fixed for trunk and 4.7 sofar.


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

* [Bug middle-end/55331] [4.6 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre
  2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2012-11-27 10:14 ` [Bug middle-end/55331] [4.6 " rguenth at gcc dot gnu.org
@ 2013-04-12 16:29 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:29 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.3

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:29:13 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.3.


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

end of thread, other threads:[~2013-04-12 16:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 21:54 [Bug middle-end/55331] New: [4.6/4.7/4.8 Regression] ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre zsojka at seznam dot cz
2012-11-14 22:16 ` [Bug middle-end/55331] " dominiq at lps dot ens.fr
2012-11-15 11:52 ` jakub at gcc dot gnu.org
2012-11-15 12:00 ` jakub at gcc dot gnu.org
2012-11-15 12:18 ` jakub at gcc dot gnu.org
2012-11-27  9:20 ` rguenth at gcc dot gnu.org
2012-11-27  9:23 ` rguenth at gcc dot gnu.org
2012-11-27 10:14 ` [Bug middle-end/55331] [4.6 " rguenth at gcc dot gnu.org
2013-04-12 16:29 ` 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).