public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/53426] [lto]: ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
@ 2012-05-20 20:01 ` pinskia at gcc dot gnu.org
  2012-05-20 20:10 ` pinskia at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-20 20:01 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal


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

* [Bug lto/53426] [lto]: ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
  2012-05-20 20:01 ` [Bug lto/53426] [lto]: ICE:create_variable_info_for at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581 pinskia at gcc dot gnu.org
@ 2012-05-20 20:10 ` pinskia at gcc dot gnu.org
  2012-05-21 10:04 ` [Bug lto/53426] [lto with ipa-pta]: " vincenzo.innocente at cern dot ch
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-20 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-05-20
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-20 19:33:12 UTC ---
Can you attach the preprocessed source rather than the object file?


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

* [Bug lto/53426] [lto with ipa-pta]: ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
  2012-05-20 20:01 ` [Bug lto/53426] [lto]: ICE:create_variable_info_for at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581 pinskia at gcc dot gnu.org
  2012-05-20 20:10 ` pinskia at gcc dot gnu.org
@ 2012-05-21 10:04 ` vincenzo.innocente at cern dot ch
  2012-05-21 12:37 ` [Bug tree-optimization/53426] [4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-05-21 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.1
            Summary|[lto]:                      |[lto with ipa-pta]:
                   |ICE:create_variable_info_fo |ICE:create_variable_info_fo
                   |r  at                       |r  at
                   |../../gcc-trunk/gcc/tree-ss |../../gcc-trunk/gcc/tree-ss
                   |a-structalias.c:5581        |a-structalias.c:5581

--- Comment #2 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-05-21 08:37:22 UTC ---
apparently it is quite easy to reproduce and it is due to "-fipa-pta"
for instance using the test case in PR53337

cat boostLto.cc
#include "boost/thread/mutex.hpp"
namespace edm {
  namespace rootfix {
    boost::mutex* getGlobalMutex();
  }
}

boost::mutex* edm::rootfix::getGlobalMutex() { 
    static boost::mutex m_;
    return &m_;
}


c++ -O3 -fPIC -shared -o bha.so boostLto.cc
-I/build/ge/new-binutils/a/slc5_amd64_gcc470/external/boost/1.49.0-cms3/include
-fipa-pta[vocms123] ~/public/ctest/bugs48 $ c++ -O3 -fPIC -flto -shared -o
bha.so boostLto.cc
-I/build/ge/new-binutils/a/slc5_amd64_gcc470/external/boost/1.49.0-cms3/include
[vocms123] ~/public/ctest/bugs48 $ c++ -O3 -fPIC -flto -shared -o bha.so
boostLto.cc
-I/build/ge/new-binutils/a/slc5_amd64_gcc470/external/boost/1.49.0-cms3/include
-fipa-pta
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: c++ returned 1 exit status
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/bin/ld: fatal error: lto-wrapper
failed
collect2: error: ld returned 1 exit status

the preprocessed source of the above source is attached to PR53337 as well


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-05-21 10:04 ` [Bug lto/53426] [lto with ipa-pta]: " vincenzo.innocente at cern dot ch
@ 2012-05-21 12:37 ` rguenth at gcc dot gnu.org
  2012-05-21 15:09 ` hubicka at ucw dot cz
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-21 12:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |lto
             Status|WAITING                     |ASSIGNED
                 CC|                            |hubicka at gcc dot gnu.org
          Component|lto                         |tree-optimization
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.8.0
            Summary|[lto with ipa-pta]:         |[4.8 Regression]
                   |ICE:create_variable_info_fo |ICE:create_variable_info_fo
                   |r  at                       |r  at
                   |../../gcc-trunk/gcc/tree-ss |../../gcc-trunk/gcc/tree-ss
                   |a-structalias.c:5581        |a-structalias.c:5581

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-21 11:45:14 UTC ---
Hum. IPA-PTA ... yeah ... :/

Mine I guess (note ipa-pta is experimental).

Honza - we are trying to access the varinfo for
_ZTIN5boost16exception_detail19error_info_injectorISt13runtime_errorEE
which is mentioned in the initializer of
_ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE
but that variable, despite mentioned, does not have a varpool entry.  Is
that by design?  Can we not look at the initializer of a decl via

      /* In IPA mode parse the initializer and generate proper constraints
         for it.  */
      else
        {
          struct varpool_node *vnode = varpool_get_node (decl);

          /* For escaped variables initialize them from nonlocal.  */
          if (!varpool_all_refs_explicit_p (vnode))
            make_copy_constraint (vi, nonlocal_id);

          /* If this is a global variable with an initializer and we are in
             IPA mode generate constraints for it.  */
          if (DECL_INITIAL (decl))
            {
...

?  Or is varpool_all_refs_explicit_p not the correct predicate to check
here?


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-05-21 12:37 ` [Bug tree-optimization/53426] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-05-21 15:09 ` hubicka at ucw dot cz
  2012-05-22 10:16 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: hubicka at ucw dot cz @ 2012-05-21 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> 2012-05-21 13:40:05 UTC ---
> Hum. IPA-PTA ... yeah ... :/
> 
> Mine I guess (note ipa-pta is experimental).
> 
> Honza - we are trying to access the varinfo for
> _ZTIN5boost16exception_detail19error_info_injectorISt13runtime_errorEE
> which is mentioned in the initializer of
> _ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE
> but that variable, despite mentioned, does not have a varpool entry.  Is
> that by design?  Can we not look at the initializer of a decl via

I suppose it is the case where
_ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE is
external but with constructor known.  I recently fixed that on mainline by
making those analyzed, too.

So if this still reproduce on mainline, it is possible that you arrive to the
constructor in some way that is not visible by varpool?

Honza


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-05-21 15:09 ` hubicka at ucw dot cz
@ 2012-05-22 10:16 ` rguenth at gcc dot gnu.org
  2012-05-22 12:39 ` hubicka at ucw dot cz
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-22 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 09:44:41 UTC ---
(In reply to comment #4)
> > Hum. IPA-PTA ... yeah ... :/
> > 
> > Mine I guess (note ipa-pta is experimental).
> > 
> > Honza - we are trying to access the varinfo for
> > _ZTIN5boost16exception_detail19error_info_injectorISt13runtime_errorEE
> > which is mentioned in the initializer of
> > _ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE
> > but that variable, despite mentioned, does not have a varpool entry.  Is
> > that by design?  Can we not look at the initializer of a decl via
> 
> I suppose it is the case where
> _ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE is
> external but with constructor known.  I recently fixed that on mainline by
> making those analyzed, too.
> 
> So if this still reproduce on mainline, it is possible that you arrive to the
> constructor in some way that is not visible by varpool?

I'm arriving at it by walking all of varpool via FOR_EACH_VARIABLE, reaching
_ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE which is

    readonly addressable used public ignored external virtual BLK file
/afs/cern.ch/cms/slc5_amd64_gcc470/external/boost/1.49.0/include/boost/exception/exception.hpp
line 315 col 9 size <integer_cst 0x7ffff5c07640 576> unit size <integer_cst
0x7ffff5c07740 72>
    align 256 context <record_type 0x7ffff5c70930 error_info_injector> initial
<constructor 0x7ffff5c6f078>>

looking at its DECL_INITIAL which contains an address of
_ZTIN5boost16exception_detail19error_info_injectorISt13runtime_errorEE
which does not have a varpool entry and is

    readonly addressable used public ignored external weak BLK file
/afs/cern.ch/cms/slc5_amd64_gcc470/external/boost/1.49.0/include/boost/exception/exception.hpp
line 315 col 9 size <integer_cst 0x7ffff5c07460 448> unit size <integer_cst
0x7ffff5c074c0 56>
    align 256 initial <error_mark 0x7ffff5ad4bb8>>

it's the pointer to the typeinfo struct, so I'm not sure we ever create
varpool entries for that.

I can of course simply guard the code doing

          struct varpool_node *vnode = varpool_get_node (decl);

          /* For escaped variables initialize them from nonlocal.  */
          if (!varpool_all_refs_explicit_p (vnode))
            make_copy_constraint (vi, nonlocal_id);

by changing it to

          if (!vnode
              || DECL_INITIAL (vnode) == error_mark_node
              || !varpool_all_refs_explicit_p (vnode))
            make_copy_constraint (vi, nonlocal_id);

also noting the special error_mark_node DECL_INITIAL (what's that coming
from!?)


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2012-05-22 10:16 ` rguenth at gcc dot gnu.org
@ 2012-05-22 12:39 ` hubicka at ucw dot cz
  2012-05-22 12:48 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: hubicka at ucw dot cz @ 2012-05-22 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jan Hubicka <hubicka at ucw dot cz> 2012-05-22 12:19:55 UTC ---
> by changing it to
> 
>           if (!vnode
>               || DECL_INITIAL (vnode) == error_mark_node
>               || !varpool_all_refs_explicit_p (vnode))
>             make_copy_constraint (vi, nonlocal_id);
> 
> also noting the special error_mark_node DECL_INITIAL (what's that coming
> from!?)

DECL_INITIAL is replaced by error mark when the variable is removed from
varpool
(so we know it is no longer going to be referenced or emit in some way) to
conserve
memory.

Other case is the partitioning, when the variable is in the other partition 
and thus there is no need to sream the DECL_INITIAL (we stream DECL_INITIAL for
variables from other partitions only when we think it may be useful for
constant
folding: that is variables passes const_value_known_p).  This is probably the
case
here.

If you only need to collect all things that escape, you can safely ignore
DECL_INITIAL of DECLs with in_ohter_partition set: all vars that are in current
partition referenced by the constructor from other partition
"used_from_other_partition" set anyway, so they won't pass
varpool_all_refs_explicit_p.

You only need to worry about local constructors.

Honza


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2012-05-22 12:39 ` hubicka at ucw dot cz
@ 2012-05-22 12:48 ` rguenth at gcc dot gnu.org
  2012-05-22 12:56 ` hubicka at ucw dot cz
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-22 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 12:47:04 UTC ---
(In reply to comment #6)
> > by changing it to
> > 
> >           if (!vnode
> >               || DECL_INITIAL (vnode) == error_mark_node
> >               || !varpool_all_refs_explicit_p (vnode))
> >             make_copy_constraint (vi, nonlocal_id);
> > 
> > also noting the special error_mark_node DECL_INITIAL (what's that coming
> > from!?)
> 
> DECL_INITIAL is replaced by error mark when the variable is removed from
> varpool
> (so we know it is no longer going to be referenced or emit in some way) to
> conserve
> memory.
> 
> Other case is the partitioning, when the variable is in the other partition 
> and thus there is no need to sream the DECL_INITIAL (we stream DECL_INITIAL for
> variables from other partitions only when we think it may be useful for
> constant
> folding: that is variables passes const_value_known_p).  This is probably the
> case
> here.
> 
> If you only need to collect all things that escape, you can safely ignore
> DECL_INITIAL of DECLs with in_ohter_partition set: all vars that are in current
> partition referenced by the constructor from other partition
> "used_from_other_partition" set anyway, so they won't pass
> varpool_all_refs_explicit_p.
> 
> You only need to worry about local constructors.

But I have a variable that fulfills varpool_all_refs_explicit_p but still
its DECL_INITIAL contains &X where I have no varpool node for X for.  So
if I constant fold from it I can get an explicit reference to a global
variable X that has no varpool node assigned.  How can that be ok?


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2012-05-22 12:48 ` rguenth at gcc dot gnu.org
@ 2012-05-22 12:56 ` hubicka at ucw dot cz
  2012-05-22 13:42 ` hubicka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: hubicka at ucw dot cz @ 2012-05-22 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jan Hubicka <hubicka at ucw dot cz> 2012-05-22 12:53:43 UTC ---
> But I have a variable that fulfills varpool_all_refs_explicit_p but still
> its DECL_INITIAL contains &X where I have no varpool node for X for.  So
> if I constant fold from it I can get an explicit reference to a global
> variable X that has no varpool node assigned.  How can that be ok?

We bring the references only for vars that pass const_value_known_p, but from
what you quote it looks like it should pass the check.  I am now tracking
memory
corruption in other PR, so i will look into this next.


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2012-05-22 12:56 ` hubicka at ucw dot cz
@ 2012-05-22 13:42 ` hubicka at gcc dot gnu.org
  2012-05-22 14:40 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-05-22 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-05-22 13:31:28 UTC ---
OK,
I see the following:
6882      FOR_EACH_VARIABLE (var)
6883        {
6884          if (var->alias)
6885            continue;
6886
6887          get_vi_for_tree (var->symbol.decl);
6888        }

(gdb) p dump_varpool_node (stderr, var)
_ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE.local.230/1658
(_ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE)
@0x7ffff75f1e88
  Type: variable
  Visibility: in_other_partition used_from_other_partition
prevailing_def_ironly external public visibility_specified visibility:hidden
virtual artificial
  References: 
  Referring:
_ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEE5cloneEv.local.151/2414
(addr)_ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEE5cloneEv.local.151/2414
(addr)
  Availability: overwritable
  Varpool flags: initialized finalized

this var won't pass varpool_all_refs_explicit: it is from other partition and
used from elsewhere.

Partitioning should have put the variables referred by this constructor into a
boundary and it is not doing it - I will fix that.
(it gets that right at my internal symbol table tree)

On the other hand, is ipa-pta able to take advantage of fact that the variable
is readonly? I would propose:
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c      (revision 187695)
+++ tree-ssa-structalias.c      (working copy)
@@ -5583,7 +5583,8 @@ create_variable_info_for (tree decl, con

          /* If this is a global variable with an initializer and we are in
             IPA mode generate constraints for it.  */
-         if (DECL_INITIAL (decl))
+         if (DECL_INITIAL (decl)
+             && vnode->analyzed)
            {
              VEC (ce_s, heap) *rhsc = NULL;
              struct constraint_expr lhs, *rhsp;

I.e. to care only about constructors of vars from current partition.
This function does not check varpool_all_refs_explicit as you suggested in
previous comment.


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2012-05-22 13:42 ` hubicka at gcc dot gnu.org
@ 2012-05-22 14:40 ` rguenth at gcc dot gnu.org
  2012-05-23  8:11 ` vincenzo.innocente at cern dot ch
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-22 14:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 13:52:49 UTC ---
(In reply to comment #9)
> OK,
> I see the following:
> 6882      FOR_EACH_VARIABLE (var)
> 6883        {
> 6884          if (var->alias)
> 6885            continue;
> 6886
> 6887          get_vi_for_tree (var->symbol.decl);
> 6888        }
> 
> (gdb) p dump_varpool_node (stderr, var)
> _ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE.local.230/1658
> (_ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE)
> @0x7ffff75f1e88
>   Type: variable
>   Visibility: in_other_partition used_from_other_partition
> prevailing_def_ironly external public visibility_specified visibility:hidden
> virtual artificial
>   References: 
>   Referring:
> _ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEE5cloneEv.local.151/2414
> (addr)_ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEE5cloneEv.local.151/2414
> (addr)
>   Availability: overwritable
>   Varpool flags: initialized finalized
> 
> this var won't pass varpool_all_refs_explicit: it is from other partition and
> used from elsewhere.
> 
> Partitioning should have put the variables referred by this constructor into a
> boundary and it is not doing it - I will fix that.
> (it gets that right at my internal symbol table tree)
> 
> On the other hand, is ipa-pta able to take advantage of fact that the variable
> is readonly? I would propose:
> Index: tree-ssa-structalias.c
> ===================================================================
> --- tree-ssa-structalias.c      (revision 187695)
> +++ tree-ssa-structalias.c      (working copy)
> @@ -5583,7 +5583,8 @@ create_variable_info_for (tree decl, con
> 
>           /* If this is a global variable with an initializer and we are in
>              IPA mode generate constraints for it.  */
> -         if (DECL_INITIAL (decl))
> +         if (DECL_INITIAL (decl)
> +             && vnode->analyzed)
>             {
>               VEC (ce_s, heap) *rhsc = NULL;
>               struct constraint_expr lhs, *rhsp;
> 
> I.e. to care only about constructors of vars from current partition.
> This function does not check varpool_all_refs_explicit as you suggested in
> previous comment.

Ok, this fixes it.  You explained DECL_INITIAL of a !vnode->analyzed can
never refer to a varpool_all_refs_explicit_p () decl.


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2012-05-22 14:40 ` rguenth at gcc dot gnu.org
@ 2012-05-23  8:11 ` vincenzo.innocente at cern dot ch
  2012-05-23 10:49 ` hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-05-23  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-05-23 08:03:54 UTC ---
sorry I cannot test the patch on the original failing files as at revision
187789 I get
cat > ipa.patch
--- tree-ssa-structalias.c      (revision 187695)
+++ tree-ssa-structalias.c      (working copy)
@@ -5583,7 +5583,8 @@ create_variable_info_for (tree decl, con

          /* If this is a global variable with an initializer and we are in
             IPA mode generate constraints for it.  */
-         if (DECL_INITIAL (decl))
+         if (DECL_INITIAL (decl)
+             && vnode->analyzed)
            {
              VEC (ce_s, heap) *rhsc = NULL;
              struct constraint_expr lhs, *rhsp;
[vocms123] /build/vin/gcc-trunk $ cd gcc
[vocms123] /build/vin/gcc-trunk/gcc $ patch -p0 < ../ipa.patch 
patching file tree-ssa-structalias.c
Hunk #1 FAILED at 5583.
1 out of 1 hunk FAILED -- saving rejects to file tree-ssa-structalias.c.rej


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2012-05-23  8:11 ` vincenzo.innocente at cern dot ch
@ 2012-05-23 10:49 ` hubicka at gcc dot gnu.org
  2012-05-23 11:53 ` rguenth at gcc dot gnu.org
  2012-05-23 12:27 ` vincenzo.innocente at cern dot ch
  14 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-05-23 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-05-23 09:47:14 UTC ---
Author: hubicka
Date: Wed May 23 09:47:10 2012
New Revision: 187799

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187799
Log:

    PR middle-end/53426
    * tree-ssa-structalias.c (create_variable_info_for): Skip constructors from
    other partitions.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-structalias.c


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2012-05-23 10:49 ` hubicka at gcc dot gnu.org
@ 2012-05-23 11:53 ` rguenth at gcc dot gnu.org
  2012-05-23 12:27 ` vincenzo.innocente at cern dot ch
  14 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-23 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-23 10:49:20 UTC ---
Fixed.


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

* [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for  at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581
       [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2012-05-23 11:53 ` rguenth at gcc dot gnu.org
@ 2012-05-23 12:27 ` vincenzo.innocente at cern dot ch
  14 siblings, 0 replies; 15+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-05-23 12:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-05-23 11:53:13 UTC ---
fix confirmed
trunk revision 187799
compiles again my large application


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

end of thread, other threads:[~2012-05-23 11:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-53426-4@http.gcc.gnu.org/bugzilla/>
2012-05-20 20:01 ` [Bug lto/53426] [lto]: ICE:create_variable_info_for at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581 pinskia at gcc dot gnu.org
2012-05-20 20:10 ` pinskia at gcc dot gnu.org
2012-05-21 10:04 ` [Bug lto/53426] [lto with ipa-pta]: " vincenzo.innocente at cern dot ch
2012-05-21 12:37 ` [Bug tree-optimization/53426] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-05-21 15:09 ` hubicka at ucw dot cz
2012-05-22 10:16 ` rguenth at gcc dot gnu.org
2012-05-22 12:39 ` hubicka at ucw dot cz
2012-05-22 12:48 ` rguenth at gcc dot gnu.org
2012-05-22 12:56 ` hubicka at ucw dot cz
2012-05-22 13:42 ` hubicka at gcc dot gnu.org
2012-05-22 14:40 ` rguenth at gcc dot gnu.org
2012-05-23  8:11 ` vincenzo.innocente at cern dot ch
2012-05-23 10:49 ` hubicka at gcc dot gnu.org
2012-05-23 11:53 ` rguenth at gcc dot gnu.org
2012-05-23 12:27 ` vincenzo.innocente at cern dot ch

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).