public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
@ 2012-01-15 14:06 gcc@Denis-Excoffier.org
  2012-01-15 14:30 ` [Bug tree-optimization/51865] [4.7 Regression] " dominiq at lps dot ens.fr
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gcc@Denis-Excoffier.org @ 2012-01-15 14:06 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51865
           Summary: ICE in insert_vi_for_tree, at
                    tree-ssa-structalias.c:2642
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@Denis-Excoffier.org


Under MacOSX (x86_64-apple-darwin11.2.0), the new gcc-4.7-20120114 gives ICE
with the following. There was no problem with the preceding snapshots. I've
still not tested under other platforms.

% cat stc.c
// gcc -O -finline-small-functions -finline-functions -fipa-pta
-fpartial-inlining -c stc.c
#include <assert.h>
void zz0(void);
static int xx0;
void zz0(void) { assert(xx0 == 0); return; };
void zz1(void) { zz0(); return; };
void zz2(void) { zz0(); return; };
%
% gcc -v -O -finline-small-functions  -finline-functions -fipa-pta
-fpartial-inlining -c stc.c
Using built-in specs.
COLLECT_GCC=/tmp/lcl/uxl/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../libexec/gcc/x86_64-apple-darwin11.2.0/4.7.0/lto-wrapper
Target: x86_64-apple-darwin11.2.0
Configured with: /tmp/lcl/tmp/gcc/gcc-4.7-20120114/configure
--prefix=/tmp/lcl/uxl/gcc-4.7-20120114 --with-local-prefix=/usr/local/here
--enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.7.0 20120114 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.7.2' '-O'
'-finline-small-functions' '-finline-functions' '-fipa-pta'
'-fpartial-inlining' '-c' '-v' '-mtune=core2'

/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../libexec/gcc/x86_64-apple-darwin11.2.0/4.7.0/cc1
-quiet -v -iprefix
/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/x86_64-apple-darwin11.2.0/4.7.0/
-D__DYNAMIC__ stc.c -fPIC -quiet -dumpbase stc.c -mmacosx-version-min=10.7.2
-mtune=core2 -auxbase stc -O -version -finline-small-functions
-finline-functions -fipa-pta -fpartial-inlining -o /tmp/cct66mxd.s
GNU C (GCC) version 4.7.0 20120114 (experimental) (x86_64-apple-darwin11.2.0)
        compiled by GNU C version 4.7.0 20120114 (experimental), GMP version
5.0.2, MPFR version 3.1.0-p4, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/x86_64-apple-darwin11.2.0/4.7.0/../../../../x86_64-apple-darwin11.2.0/include"
ignoring duplicate directory
"/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin11.2.0/4.7.0/include"
ignoring nonexistent directory "/usr/local/here/include"
ignoring duplicate directory
"/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin11.2.0/4.7.0/include-fixed"
ignoring nonexistent directory
"/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin11.2.0/4.7.0/../../../../x86_64-apple-darwin11.2.0/include"
#include "..." search starts here:
#include <...> search starts here:

/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/x86_64-apple-darwin11.2.0/4.7.0/include

/Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/x86_64-apple-darwin11.2.0/4.7.0/include-fixed
 /Users/denis/darlcl/uxl/gcc-4.7-20120114/bin/../lib/gcc/../../include
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
GNU C (GCC) version 4.7.0 20120114 (experimental) (x86_64-apple-darwin11.2.0)
        compiled by GNU C version 4.7.0 20120114 (experimental), GMP version
5.0.2, MPFR version 3.1.0-p4, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 0bf7ee2f49f6ea7e3844a6dc703323f3
stc.c:7:1: internal compiler error: in insert_vi_for_tree, at
tree-ssa-structalias.c:2642
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
@ 2012-01-15 14:30 ` dominiq at lps dot ens.fr
  2012-01-15 17:01 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-15 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-15
            Summary|ICE in insert_vi_for_tree,  |[4.7 Regression] ICE in
                   |at                          |insert_vi_for_tree, at
                   |tree-ssa-structalias.c:2642 |tree-ssa-structalias.c:2642
     Ever Confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-15 14:05:50 UTC ---
Confirmed on powerpc-apple-darwin9 and x86_64-apple-darwin10 with revision
183181. Revision 183001 is OK. The ICE is also triggered with '-O1
-finline-small-functions -finline-functions -fipa-pta -fpartial-inlining' up to
 '-O3 -fipa-pta'. If I set a break point for insert_vi_for_tree, I see it
called several time before reaching:


Breakpoint 1, insert_vi_for_tree (t=<value optimized out>, vi=<value optimized
out>) at ../../work/gcc/tree-ssa-structalias.c:2639
2639    {
(gdb) bt
#0  insert_vi_for_tree (t=<value optimized out>, vi=<value optimized out>) at
../../work/gcc/tree-ssa-structalias.c:2639
#1  0x00000001008deb61 in ipa_pta_execute () at
../../work/gcc/tree-ssa-structalias.c:5343
#2  0x000000010068d299 in execute_one_pass (pass=0x100da2120) at
../../work/gcc/passes.c:2081
#3  0x000000010068db32 in execute_ipa_pass_list (pass=0x100da2120) at
../../work/gcc/passes.c:2448
#4  0x0000000100399c06 in cgraph_optimize () at
../../work/gcc/cgraphunit.c:2183
#5  0x000000010039a90a in cgraph_finalize_compilation_unit () at
../../work/gcc/cgraphunit.c:1327
#6  0x0000000100020613 in c_write_global_declarations () at
../../work/gcc/c-decl.c:10030
#7  0x0000000100750640 in toplev_main (argc=4, argv=0x7fff5fbfd808) at
../../work/gcc/toplev.c:573
#8  0x00000001000014d4 in start ()
(gdb) c
Continuing.

pr51865.c:6:1: internal compiler error: in insert_vi_for_tree, at
tree-ssa-structalias.c:2642
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Program exited with code 04.


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
  2012-01-15 14:30 ` [Bug tree-optimization/51865] [4.7 Regression] " dominiq at lps dot ens.fr
@ 2012-01-15 17:01 ` jakub at gcc dot gnu.org
  2012-01-15 17:12 ` dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-15 17:01 UTC (permalink / raw)
  To: gcc-bugs

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

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-01-15 15:30:58 UTC ---
Please attach preprocessed testcase.


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
  2012-01-15 14:30 ` [Bug tree-optimization/51865] [4.7 Regression] " dominiq at lps dot ens.fr
  2012-01-15 17:01 ` jakub at gcc dot gnu.org
@ 2012-01-15 17:12 ` dominiq at lps dot ens.fr
  2012-01-15 17:22 ` steven at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-15 17:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-15 16:09:20 UTC ---
Created attachment 26333
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26333
preprocessed testcase

> Please attach preprocessed testcase.

r183091 is OK
r183136 gives the ICE.


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (2 preceding siblings ...)
  2012-01-15 17:12 ` dominiq at lps dot ens.fr
@ 2012-01-15 17:22 ` steven at gcc dot gnu.org
  2012-01-15 17:31 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu.org @ 2012-01-15 17:22 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

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

--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-01-15 17:12:29 UTC ---
Confirmed also on x86_64-unknown-linux-gnu


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (3 preceding siblings ...)
  2012-01-15 17:22 ` steven at gcc dot gnu.org
@ 2012-01-15 17:31 ` jakub at gcc dot gnu.org
  2012-01-15 17:40 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-15 17:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-15 17:22:03 UTC ---
/* { dg-do compile } */
/* { dg-options "-O2 -fipa-pta" } */

void fn (const char *, const char *) __attribute__ ((__noreturn__));
int var;

inline void
foo (void)
{
  if (__builtin_expect (var != 0, 0))
    fn ("a", "b");
};

void
bar (void)
{
  foo ();
};

void
baz (void)
{
  foo ();
};

Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183102


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (4 preceding siblings ...)
  2012-01-15 17:31 ` jakub at gcc dot gnu.org
@ 2012-01-15 17:40 ` jakub at gcc dot gnu.org
  2012-01-15 18:03 ` steven at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-15 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (5 preceding siblings ...)
  2012-01-15 17:40 ` jakub at gcc dot gnu.org
@ 2012-01-15 18:03 ` steven at gcc dot gnu.org
  2012-01-15 19:15 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu.org @ 2012-01-15 18:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2012-01-15 17:31:14 UTC ---
(In reply to comment #5)

> Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183102

That is the patch here:
http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00510.html

So if someone comes up with a fix for this: Please also test with Ada enabled.


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (6 preceding siblings ...)
  2012-01-15 18:03 ` steven at gcc dot gnu.org
@ 2012-01-15 19:15 ` jakub at gcc dot gnu.org
  2012-01-16 11:18 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-15 19:15 UTC (permalink / raw)
  To: gcc-bugs

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

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 #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-15 19:11:55 UTC ---
Created attachment 26334
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26334
gcc47-pr51865.patch

Untested fix.  If DECL_RESULT has void type, it must have remap_decl called on
it, otherwise we share the same RESULT_DECL between multiple functions.


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (7 preceding siblings ...)
  2012-01-15 19:15 ` jakub at gcc dot gnu.org
@ 2012-01-16 11:18 ` jakub at gcc dot gnu.org
  2012-01-16 12:14 ` jakub at gcc dot gnu.org
  2012-01-22 11:40 ` gcc@Denis-Excoffier.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-16 11:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-16 11:12:58 UTC ---
Author: jakub
Date: Mon Jan 16 11:12:53 2012
New Revision: 183207

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183207
Log:
    PR tree-optimization/51865
    * tree-inline.c (tree_function_versioning): Call remap_decl
    on DECL_RESULT whenever it has VOID_TYPE_P type.

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

Added:
    trunk/gcc/testsuite/gcc.dg/pr51865.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-inline.c


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (8 preceding siblings ...)
  2012-01-16 11:18 ` jakub at gcc dot gnu.org
@ 2012-01-16 12:14 ` jakub at gcc dot gnu.org
  2012-01-22 11:40 ` gcc@Denis-Excoffier.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-16 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-16 11:16:41 UTC ---
Fixed.


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

* [Bug tree-optimization/51865] [4.7 Regression] ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642
  2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
                   ` (9 preceding siblings ...)
  2012-01-16 12:14 ` jakub at gcc dot gnu.org
@ 2012-01-22 11:40 ` gcc@Denis-Excoffier.org
  10 siblings, 0 replies; 12+ messages in thread
From: gcc@Denis-Excoffier.org @ 2012-01-22 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Denis Excoffier <gcc@Denis-Excoffier.org> 2012-01-22 10:18:47 UTC ---
(In reply to comment #9)
> Fixed.
Confirmed, using gcc-4.7-20120121. Thank you.


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

end of thread, other threads:[~2012-01-22 10:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-15 14:06 [Bug tree-optimization/51865] New: ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642 gcc@Denis-Excoffier.org
2012-01-15 14:30 ` [Bug tree-optimization/51865] [4.7 Regression] " dominiq at lps dot ens.fr
2012-01-15 17:01 ` jakub at gcc dot gnu.org
2012-01-15 17:12 ` dominiq at lps dot ens.fr
2012-01-15 17:22 ` steven at gcc dot gnu.org
2012-01-15 17:31 ` jakub at gcc dot gnu.org
2012-01-15 17:40 ` jakub at gcc dot gnu.org
2012-01-15 18:03 ` steven at gcc dot gnu.org
2012-01-15 19:15 ` jakub at gcc dot gnu.org
2012-01-16 11:18 ` jakub at gcc dot gnu.org
2012-01-16 12:14 ` jakub at gcc dot gnu.org
2012-01-22 11:40 ` gcc@Denis-Excoffier.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).