public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc
@ 2013-10-04 13:01 ramana at gcc dot gnu.org
  2013-10-04 13:07 ` [Bug tree-optimization/58619] ICE building " ramana at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ramana at gcc dot gnu.org @ 2013-10-04 13:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58619
           Summary: ICE building libstdc++-v3 on arm-none-linux-gnueabihf
                    in gen_combined_adhoc_loc
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ramana at gcc dot gnu.org

Created attachment 30954
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30954&action=edit
pre-processed file from libstdc++

Currently reducing the testcase but I ran into this issue today. 

$> ./xgcc -B`pwd` -S -O2 -march=armv7-a -mfpu=neon -mfloat-abi=hard
sstream-inst.ii

0xaf826f crash_signal
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/toplev.c:335
0x1024aa2 get_combined_adhoc_loc(line_maps*, unsigned int, void*)
        /tmp/ramrad01-workarea/wa3/src/gcc/libcpp/line-map.c:106
0xb51ed7 copy_phis_for_bb
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/tree-inline.c:2093
0xb51ed7 copy_cfg_body
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/tree-inline.c:2446
0xb51ed7 copy_body
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/tree-inline.c:2625
0xb53875 expand_call_inline
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/tree-inline.c:4234
0xb53875 gimple_expand_calls_inline
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/tree-inline.c:4341
0xb53875 optimize_inline_calls(tree_node*)
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/tree-inline.c:4496
0xf78ddb inline_transform(cgraph_node*)
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/ipa-inline-transform.c:436
0xa4e320 execute_one_ipa_transform_pass
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/passes.c:2039
0xa4e320 execute_all_ipa_transforms()
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/passes.c:2079
0x8038aa expand_function
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/cgraphunit.c:1743
0x8056e0 expand_all_functions
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/cgraphunit.c:1855
0x8056e0 compile()
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/cgraphunit.c:2192
0x805ec4 finalize_compilation_unit()
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/cgraphunit.c:2269
0x60df88 cp_write_global_declarations()
        /tmp/ramrad01-workarea/wa3/src/gcc/gcc/cp/decl2.c:4360



build a cross compiler by just doing the following 

$SRC/configure --target=arm-linux-gnueabihf --with-arch=armv7-a
--with-float=hard --with-fpu=neon


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

* [Bug tree-optimization/58619] ICE building in gen_combined_adhoc_loc
  2013-10-04 13:01 [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc ramana at gcc dot gnu.org
@ 2013-10-04 13:07 ` ramana at gcc dot gnu.org
  2013-10-04 13:43 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ramana at gcc dot gnu.org @ 2013-10-04 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm-none-linux-gnueabi,
                   |                            |arm-none-linux-gnueabihf
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2013-10-04
     Ever confirmed|0                           |1
            Summary|ICE building libstdc++-v3   |ICE building in
                   |on arm-none-linux-gnueabihf |gen_combined_adhoc_loc
                   |in gen_combined_adhoc_loc   |
   Target Milestone|---                         |4.9.0
      Known to fail|                            |4.9.0


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

* [Bug tree-optimization/58619] ICE building in gen_combined_adhoc_loc
  2013-10-04 13:01 [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc ramana at gcc dot gnu.org
  2013-10-04 13:07 ` [Bug tree-optimization/58619] ICE building " ramana at gcc dot gnu.org
@ 2013-10-04 13:43 ` hubicka at gcc dot gnu.org
  2013-10-04 15:08 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-10-04 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jakub at redhat dot com,
                   |                            |rguenther at suse dot de

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The problem is only triggered by Rong's patch - changes in profile should never
provoke ICE in inliner.

We ICE in 
129921      jakub               }
191494      dehao             locus = gimple_phi_arg_location_from_edge (phi,
old_edge);
191494      dehao             if (LOCATION_BLOCK (locus))
191494      dehao               {
191494      dehao                 tree *n;
191494      dehao                 n = (tree *) pointer_map_contains
(id->decl_map,
191494      dehao                       LOCATION_BLOCK (locus));
191494      dehao                 gcc_assert (n);
195509    rguenth                 locus = COMBINE_LOCATION_DATA (line_table,
locus, *n);
191494      dehao               }
195509    rguenth             else
195509    rguenth               locus = LOCATION_LOCUS (locus);
191494      dehao
195509    rguenth             add_phi_arg (new_phi, new_arg, new_edge, locus);


calling COMBINE_LOCAL_DATA.  I am not familiar with this code.
The code in question was added by
http://gcc.gnu.org/ml/gcc-patches/2013-01/msg01311.html

Richi, Jakub, any ideas?

I am trying to reprodue this in cross.


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

* [Bug tree-optimization/58619] ICE building in gen_combined_adhoc_loc
  2013-10-04 13:01 [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc ramana at gcc dot gnu.org
  2013-10-04 13:07 ` [Bug tree-optimization/58619] ICE building " ramana at gcc dot gnu.org
  2013-10-04 13:43 ` hubicka at gcc dot gnu.org
@ 2013-10-04 15:08 ` hubicka at gcc dot gnu.org
  2013-10-04 18:48 ` dehao at google dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-10-04 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The ICE is caused by *n being NULL, so it seems we did not remap the block.
This perhaps means that we have stale block in the edge location?

Honza


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

* [Bug tree-optimization/58619] ICE building in gen_combined_adhoc_loc
  2013-10-04 13:01 [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc ramana at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-10-04 15:08 ` hubicka at gcc dot gnu.org
@ 2013-10-04 18:48 ` dehao at google dot com
  2013-10-08  8:34 ` ramana at gcc dot gnu.org
  2013-10-08 17:00 ` ramana at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: dehao at google dot com @ 2013-10-04 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

Dehao Chen <dehao at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dehao at google dot com

--- Comment #3 from Dehao Chen <dehao at google dot com> ---
This is a bug when updating block during tree-inline. Basically, it is legal
for *n to be NULL. E.g. When gimple_block(id->gimple_call) is NULL,
remap_blocks_to_null will be called to set *n to NULL.

The problem is that we should check this before calling COMBINE_LOCATION_DATA,
which assumes block is not NULL.

The following patch can fix the problem:

Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c    (revision 203208)
+++ gcc/tree-inline.c    (working copy)
@@ -2090,7 +2090,10 @@ copy_phis_for_bb (basic_block bb, copy_body_data *
           n = (tree *) pointer_map_contains (id->decl_map,
             LOCATION_BLOCK (locus));
           gcc_assert (n);
-          locus = COMBINE_LOCATION_DATA (line_table, locus, *n);
+          if (*n)
+            locus = COMBINE_LOCATION_DATA (line_table, locus, *n);
+          else
+            locus = LOCATION_LOCUS (locus);
         }
           else
         locus = LOCATION_LOCUS (locus);


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

* [Bug tree-optimization/58619] ICE building in gen_combined_adhoc_loc
  2013-10-04 13:01 [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc ramana at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-10-04 18:48 ` dehao at google dot com
@ 2013-10-08  8:34 ` ramana at gcc dot gnu.org
  2013-10-08 17:00 ` ramana at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ramana at gcc dot gnu.org @ 2013-10-08  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Author: ramana
Date: Tue Oct  8 08:34:28 2013
New Revision: 203269

URL: http://gcc.gnu.org/viewcvs?rev=203269&root=gcc&view=rev
Log:
PR tree-optimization/58619

2013-10-08  Dehao Chen  <dehao@google.com>

    * tree-inline.c (copy_phis_for_bb): Combine location data
    only if non-null.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-inline.c


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

* [Bug tree-optimization/58619] ICE building in gen_combined_adhoc_loc
  2013-10-04 13:01 [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc ramana at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-10-08  8:34 ` ramana at gcc dot gnu.org
@ 2013-10-08 17:00 ` ramana at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ramana at gcc dot gnu.org @ 2013-10-08 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

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

--- Comment #6 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2013-10-08 17:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04 13:01 [Bug tree-optimization/58619] New: ICE building libstdc++-v3 on arm-none-linux-gnueabihf in gen_combined_adhoc_loc ramana at gcc dot gnu.org
2013-10-04 13:07 ` [Bug tree-optimization/58619] ICE building " ramana at gcc dot gnu.org
2013-10-04 13:43 ` hubicka at gcc dot gnu.org
2013-10-04 15:08 ` hubicka at gcc dot gnu.org
2013-10-04 18:48 ` dehao at google dot com
2013-10-08  8:34 ` ramana at gcc dot gnu.org
2013-10-08 17:00 ` ramana 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).