public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
@ 2013-01-18 11:53 rguenth at gcc dot gnu.org
  2013-01-18 11:55 ` [Bug tree-optimization/56029] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-18 11:53 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56029
           Summary: [4.8 Regression] ICE: verify_gimple failed, location
                    references block not in block tree
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: ice-checking
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
            Target: x86_64-*-*


Created attachment 29203
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29203
preprocessed source

/usr/lib64/gcc/x86_64-suse-linux/4.8/cc1plus -fpreprocessed dns_socket_pool.ii
-quiet -dumpbase dns_socket_pool.cc -mtune=generic -march=x86-64 -auxbase-strip
out/Release/obj.target/net/net/dns/dns_socket_pool.o -g -O2 -Wno-error
-Wno-unused-local-typedefs -Wall -Wno-unused-parameter
-Wno-missing-field-initializers -Wsign-compare -version -fstack-protector
-fmessage-length=0 -fno-ipa-cp -fno-strict-aliasing -fvisibility=hidden -fPIC
-fno-ident -fdata-sections -ffunction-sections -fno-rtti
-fno-threadsafe-statics -fvisibility-inlines-hidden --param ssp-buffer-size=4
-o dns_socket_pool.s
GNU C++ (SUSE Linux) version 4.8.0 20130117 [trunk revision 195262]
(x86_64-suse-linux)
        compiled by GNU C version 4.8.0 20130117 [trunk revision 195262], GMP
version 5.0.5, MPFR version 3.1.1, MPC version 1.0
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (SUSE Linux) version 4.8.0 20130117 [trunk revision 195262]
(x86_64-suse-linux)
        compiled by GNU C version 4.8.0 20130117 [trunk revision 195262], GMP
version 5.0.5, MPFR version 3.1.1, MPC version 1.0
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: ba85569e74db19427ec68813700a0fb9
net/dns/dns_socket_pool.cc: In member function
'scoped_ptr<net::DatagramClientSocket>
net::DnsSocketPool::CreateConnectedSocket(unsigned int)':
net/dns/dns_socket_pool.cc:72:34: error: location references block not in block
tree
 scoped_ptr<DatagramClientSocket> DnsSocketPool::CreateConnectedSocket(
                                  ^
socket$ptr_104 = PHI <0B(10), 0B(15), socket$ptr_82(18), 0B(44),
socket$ptr_82(50), socket$ptr_82(20), socket$ptr_82(22), socket$ptr_82(28),
socket$ptr_82(33), socket$ptr_82(35), socket$ptr_82(41), socket$ptr_82(47),
0B(11), 0B(13)>

net/dns/dns_socket_pool.cc:72:34: internal compiler error: verify_gimple failed
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
@ 2013-01-18 11:55 ` rguenth at gcc dot gnu.org
  2013-01-18 12:17 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-18 11:55 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-18 11:55:04 UTC ---
Reducing.  Fails with plain -O1.


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
  2013-01-18 11:55 ` [Bug tree-optimization/56029] " rguenth at gcc dot gnu.org
@ 2013-01-18 12:17 ` rguenth at gcc dot gnu.org
  2013-01-18 13:03 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-18 12:17 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-01-18
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-18 12:16:36 UTC ---
It's the PHI arg location of

 <integer_cst 0x7ffff47f59e0 type <pointer_type 0x7ffff6754d20> constant 0>

as seen after IPA inline transform.

Ah ...

          FOR_EACH_PHI_ARG (arg_p, phi, i, SSA_OP_ALL_USES)
            {
              tree arg = USE_FROM_PTR (arg_p);
              int index = PHI_ARG_INDEX_FROM_USE (arg_p);
              tree block =
                LOCATION_BLOCK (gimple_phi_arg_location (phi, index));
              if (block != NULL)
                TREE_USED (block) = true;
              mark_all_vars_used (&arg);
            }

well - that doesn't consider non-SSA args.


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
  2013-01-18 11:55 ` [Bug tree-optimization/56029] " rguenth at gcc dot gnu.org
  2013-01-18 12:17 ` rguenth at gcc dot gnu.org
@ 2013-01-18 13:03 ` rguenth at gcc dot gnu.org
  2013-01-18 13:15 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-18 13:03 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-18 13:02:40 UTC ---
(In reply to comment #2)
> It's the PHI arg location of
> 
>  <integer_cst 0x7ffff47f59e0 type <pointer_type 0x7ffff6754d20> constant 0>
> 
> as seen after IPA inline transform.
> 
> Ah ...
> 
>           FOR_EACH_PHI_ARG (arg_p, phi, i, SSA_OP_ALL_USES)
>             {
>               tree arg = USE_FROM_PTR (arg_p);
>               int index = PHI_ARG_INDEX_FROM_USE (arg_p);
>               tree block =
>                 LOCATION_BLOCK (gimple_phi_arg_location (phi, index));
>               if (block != NULL)
>                 TREE_USED (block) = true;
>               mark_all_vars_used (&arg);
>             }
> 
> well - that doesn't consider non-SSA args.

Err, no.  That's correct.

The PHI node in question (but not the argument) is allocated by make_eh_edges
from copy_edges_for_bb.


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-01-18 13:03 ` rguenth at gcc dot gnu.org
@ 2013-01-18 13:15 ` rguenth at gcc dot gnu.org
  2013-01-18 16:55 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-18 13:15 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-18 13:14:28 UTC ---
Created attachment 29204
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29204
somewhat reduced testcase

Somewhat reduced testcase.


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-01-18 13:15 ` rguenth at gcc dot gnu.org
@ 2013-01-18 16:55 ` jakub at gcc dot gnu.org
  2013-01-18 16:56 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-18 16:55 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-18 16:54:56 UTC ---
Created attachment 29209
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29209
gcc48-pr56029.patch

The bug is that neither reserve_phi_args_for_new_edge nor remove_phi_arg_num
clears gimple_phi_arg_location (only resize_phi_node does), so if some
GIMPLE_PHI references some BLOCK in some argument, then that phi is shrunk a
little bit where that argument is no longer used, then we remove unused blocks
and then grow the same PHI again and nothing overrides gimple_phi_arg_location
of the added argument, the old location magically reappears.

This patch fixes this on the reserve_phi_args_for_new_edge side.  Of course the
question is also why the caller doesn't set gimple_phi_arg_location for
something, but I'd say the code just should be robust in any case and when it
isn't called explicitly, UNKNOWN_LOCATION should be in there.


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-01-18 16:55 ` jakub at gcc dot gnu.org
@ 2013-01-18 16:56 ` jakub at gcc dot gnu.org
  2013-01-18 20:25 ` jakub at gcc dot gnu.org
  2013-01-18 20:28 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-18 16:56 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-18 16:56:34 UTC ---
Created attachment 29210
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29210
gcc48-pr56029-2.patch

Alternatively the location can be reset when shrinking the PHI node.
I prefer the first patch though (and am going to bootstrap/regtest it).


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-01-18 16:56 ` jakub at gcc dot gnu.org
@ 2013-01-18 20:25 ` jakub at gcc dot gnu.org
  2013-01-18 20:28 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-18 20:25 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-18 20:24:49 UTC ---
Author: jakub
Date: Fri Jan 18 20:24:34 2013
New Revision: 195304

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195304
Log:
    PR tree-optimization/56029
    * tree-phinodes.c (reserve_phi_args_for_new_edge): Set
    gimple_phi_arg_location for the new arg to UNKNOWN_LOCATION.

    * g++.dg/torture/pr56029.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr56029.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-phinodes.c


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

* [Bug tree-optimization/56029] [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree
  2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-01-18 20:25 ` jakub at gcc dot gnu.org
@ 2013-01-18 20:28 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-18 20:28 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-18 20:28:12 UTC ---
Fixed.


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

end of thread, other threads:[~2013-01-18 20:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 11:53 [Bug tree-optimization/56029] New: [4.8 Regression] ICE: verify_gimple failed, location references block not in block tree rguenth at gcc dot gnu.org
2013-01-18 11:55 ` [Bug tree-optimization/56029] " rguenth at gcc dot gnu.org
2013-01-18 12:17 ` rguenth at gcc dot gnu.org
2013-01-18 13:03 ` rguenth at gcc dot gnu.org
2013-01-18 13:15 ` rguenth at gcc dot gnu.org
2013-01-18 16:55 ` jakub at gcc dot gnu.org
2013-01-18 16:56 ` jakub at gcc dot gnu.org
2013-01-18 20:25 ` jakub at gcc dot gnu.org
2013-01-18 20:28 ` 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).