public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/62026] [4.9/4.10 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
@ 2014-08-05 19:30 ` d.g.gorbachev at gmail dot com
  2014-08-06  8:58 ` rguenth at gcc dot gnu.org
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2014-08-05 19:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #1 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> ---
Created attachment 33251
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33251&action=edit
Backtrace from 4.10.0

Appeared in rev. (208444, 209348].


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

* [Bug lto/62026] [4.9/4.10 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
  2014-08-05 19:30 ` [Bug lto/62026] [4.9/4.10 Regression] Crash in lto_get_decl_name_mapping d.g.gorbachev at gmail dot com
@ 2014-08-06  8:58 ` rguenth at gcc dot gnu.org
  2014-08-09 14:55 ` trippels at gcc dot gnu.org
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-06  8:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org
   Target Milestone|---                         |4.9.2


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

* [Bug lto/62026] [4.9/4.10 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
  2014-08-05 19:30 ` [Bug lto/62026] [4.9/4.10 Regression] Crash in lto_get_decl_name_mapping d.g.gorbachev at gmail dot com
  2014-08-06  8:58 ` rguenth at gcc dot gnu.org
@ 2014-08-09 14:55 ` trippels at gcc dot gnu.org
  2014-08-17  5:27 ` [Bug lto/62026] [4.9/5 " d.g.gorbachev at gmail dot com
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-08-09 14:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-08-09
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Also happens during Firefox libxul link:

markus@x4 library % cat minimal
/var/tmp/moz-build-dir/toolkit/library/../../dom/ipc/TabChild.o
/var/tmp/moz-build-dir/toolkit/library/../../widget/xpwidgets/nsContentProcessWidgetFactory.o
/var/tmp/moz-build-dir/toolkit/library/../../widget/xpwidgets/nsIdleService.o
/var/tmp/moz-build-dir/toolkit/library/../../widget/xpwidgets/nsScreenManagerProxy.o
/var/tmp/moz-build-dir/toolkit/library/../../widget/xpwidgets/nsTransferable.o
/var/tmp/moz-build-dir/toolkit/library/../../widget/gtk/nsWidgetFactory.o
/var/tmp/moz-build-dir/toolkit/library/../../widget/gtk/nsWindow.o

markus@x4 library % c++ -w -flto -pipe -O3 -shared -Wfatal-errors @minimal
lto1: internal compiler error: Segmentation fault
0x91a64f crash_signal
        ../../gcc/gcc/toplev.c:337
0x81df58 lto_get_decl_name_mapping(lto_file_decl_data*, char const*)
        ../../gcc/gcc/lto-section-in.c:340
0x8174a6 copy_function_or_variable
        ../../gcc/gcc/lto-streamer-out.c:2162
0x8180f1 lto_output()
        ../../gcc/gcc/lto-streamer-out.c:2254
0x862601 write_lto
        ../../gcc/gcc/passes.c:2226
0x865b11 ipa_write_optimization_summaries(lto_symtab_encoder_d*)
        ../../gcc/gcc/passes.c:2423
0x5424ba do_stream_out
        ../../gcc/gcc/lto/lto.c:2457
0x544d39 stream_out
        ../../gcc/gcc/lto/lto.c:2499
0x544d39 lto_wpa_write_files
        ../../gcc/gcc/lto/lto.c:2636
0x54d24a do_whole_program_analysis
        ../../gcc/gcc/lto/lto.c:3304
0x54d24a lto_main()
        ../../gcc/gcc/lto/lto.c:3424
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: fatal error: /var/tmp/gcc_test/usr/local/bin/c++ returned 1 exit
status
compilation terminated.
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status

The attached testcase doesn't reproduce the issue for me.


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-08-09 14:55 ` trippels at gcc dot gnu.org
@ 2014-08-17  5:27 ` d.g.gorbachev at gmail dot com
  2014-08-29  8:40 ` trippels at gcc dot gnu.org
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2014-08-17  5:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

Dmitry Gorbachev <d.g.gorbachev at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org
      Known to fail|4.10.0                      |5.0

--- Comment #3 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> ---
Appeared after PR60640 fix, r209097, Martin Jambor.


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-08-17  5:27 ` [Bug lto/62026] [4.9/5 " d.g.gorbachev at gmail dot com
@ 2014-08-29  8:40 ` trippels at gcc dot gnu.org
  2014-08-29  9:46 ` smf.linux at ntlworld dot com
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-08-29  8:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smf.linux at ntlworld dot com

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 62303 has been marked as a duplicate of this bug. ***


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-08-29  8:40 ` trippels at gcc dot gnu.org
@ 2014-08-29  9:46 ` smf.linux at ntlworld dot com
  2014-08-29 10:06 ` trippels at gcc dot gnu.org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: smf.linux at ntlworld dot com @ 2014-08-29  9:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #5 from Stuart Foster <smf.linux at ntlworld dot com> ---
(In reply to Markus Trippelsdorf from comment #4)
> *** Bug 62303 has been marked as a duplicate of this bug. ***

Which branch of gcc is this fix in ?

Thanks


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-08-29  9:46 ` smf.linux at ntlworld dot com
@ 2014-08-29 10:06 ` trippels at gcc dot gnu.org
  2014-08-29 12:54 ` smf.linux at ntlworld dot com
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-08-29 10:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Stuart Foster from comment #5)
> (In reply to Markus Trippelsdorf from comment #4)
> > *** Bug 62303 has been marked as a duplicate of this bug. ***
> 
> Which branch of gcc is this fix in ?

It is not fixed yet.


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2014-08-29 10:06 ` trippels at gcc dot gnu.org
@ 2014-08-29 12:54 ` smf.linux at ntlworld dot com
  2014-09-03 11:57 ` jamborm at gcc dot gnu.org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: smf.linux at ntlworld dot com @ 2014-08-29 12:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #7 from Stuart Foster <smf.linux at ntlworld dot com> ---
(In reply to Markus Trippelsdorf from comment #6)
> (In reply to Stuart Foster from comment #5)
> > (In reply to Markus Trippelsdorf from comment #4)
> > > *** Bug 62303 has been marked as a duplicate of this bug. ***
> > 
> > Which branch of gcc is this fix in ?
> 
> It is not fixed yet.

Sorry miss read comment 3.


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2014-08-29 12:54 ` smf.linux at ntlworld dot com
@ 2014-09-03 11:57 ` jamborm at gcc dot gnu.org
  2014-09-14 14:57 ` smf.linux at ntlworld dot com
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-09-03 11:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #8 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I'm sorry but I cannot reproduce the problem with the attached testcase.  I
will try the libxul link.


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2014-09-03 11:57 ` jamborm at gcc dot gnu.org
@ 2014-09-14 14:57 ` smf.linux at ntlworld dot com
  2014-09-14 14:59 ` smf.linux at ntlworld dot com
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: smf.linux at ntlworld dot com @ 2014-09-14 14:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #9 from Stuart Foster <smf.linux at ntlworld dot com> ---
Created attachment 33491
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33491&action=edit
Preprocessed chunk of qt 4.8.6 (libQtCLucene.so.4.8.6)


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2014-09-14 14:57 ` smf.linux at ntlworld dot com
@ 2014-09-14 14:59 ` smf.linux at ntlworld dot com
  2014-09-14 15:42 ` trippels at gcc dot gnu.org
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: smf.linux at ntlworld dot com @ 2014-09-14 14:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #10 from Stuart Foster <smf.linux at ntlworld dot com> ---
The chunk of code from Qt fails for me with a LFS built g++ 4.9.1 and binutils
2.24.


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2014-09-14 14:59 ` smf.linux at ntlworld dot com
@ 2014-09-14 15:42 ` trippels at gcc dot gnu.org
  2014-09-23 11:21 ` jamborm at gcc dot gnu.org
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-09-14 15:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #11 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Thanks for the testcase.

Reduced:

markus@x4 /tmp % cat ErrorTry.ii
template <typename T>
class B {
 public:
  T values;
  T operator[](int);
};
class C;
class D {
 public:
  int m_fn2();
  virtual C *m_fn1();
};
class C : public D {
 public:
  virtual B<int> *m_fn3(int);
};
class F : D, C {
  B<int> *offsets;
  B<int> *m_fn3(int);
};
B<int> *F::m_fn3(int) {
  if (offsets) return 0;
}
void fn1(B<D *> &p1) {
  for (int i;;) {
    C *a = p1[0]->m_fn1();
    a->m_fn2() && a->m_fn3(0);
  }
}
markus@x4 /tmp % g++ -flto -O3 -r -nostdlib ErrorTry.ii
ErrorTry.ii:17:7: warning: direct base ‘D’ inaccessible in ‘F’ due to ambiguity
 class F : D, C {
       ^
lto1: internal compiler error: Segmentation fault
0x943f9f crash_signal
        ../../gcc/gcc/toplev.c:340
0x843af8 lto_get_decl_name_mapping(lto_file_decl_data*, char const*)
        ../../gcc/gcc/lto-section-in.c:340
0x83ce96 copy_function_or_variable
        ../../gcc/gcc/lto-streamer-out.c:2163
0x83dae1 lto_output()
        ../../gcc/gcc/lto-streamer-out.c:2255
0x889701 write_lto
        ../../gcc/gcc/passes.c:2228
0x88cccb ipa_write_optimization_summaries(lto_symtab_encoder_d*)
        ../../gcc/gcc/passes.c:2425
0x55db6a do_stream_out
        ../../gcc/gcc/lto/lto.c:2463
0x55f849 stream_out
        ../../gcc/gcc/lto/lto.c:2505
0x55f849 lto_wpa_write_files
        ../../gcc/gcc/lto/lto.c:2642
0x568a94 do_whole_program_analysis
        ../../gcc/gcc/lto/lto.c:3310
0x568a94 lto_main()
        ../../gcc/gcc/lto/lto.c:3430
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-461794-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 14 15:57:09 2014
Return-Path: <gcc-bugs-return-461794-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22515 invoked by alias); 14 Sep 2014 15:57:09 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22473 invoked by uid 48); 14 Sep 2014 15:57:04 -0000
From: "danglin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/61853] [4.9/5 Regression] ICE: SIGSEGV in store_field
Date: Sun, 14 Sep 2014 15:57:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: danglin at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61853-4-11IcVFYlxs@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61853-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61853-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-09/txt/msg01628.txt.bz2
Content-length: 627

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida853

--- Comment #12 from John David Anglin <danglin at gcc dot gnu.org> ---
I have a patch to pa_function_value that avoids the issue but I tend to
think there is a bug in expand.

This code

typedef struct { double x; } sd_t;
sd_t foo1 (double d)
{
  sd_t s;
  s.x = d;
  return s;
}

results in the following gimple

foo1 (double d)
{
  struct sd_t D.1360;

;;   basic block 2, loop depth 0
;;    pred:       ENTRY
  MEM[(struct  *)&D.1360] = d_2(D);
  return D.1360;
;;    succ:       EXIT

}

This gimple seems similar to that in comment #10 but
it doesn't trigger the ICE.


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2014-09-14 15:42 ` trippels at gcc dot gnu.org
@ 2014-09-23 11:21 ` jamborm at gcc dot gnu.org
  2014-09-23 11:38 ` trippels at gcc dot gnu.org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-09-23 11:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |hubicka at gcc dot gnu.org

--- Comment #12 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Thanks a lot for the testcase.  I have talked about it with Honza on
IRC yesterday he said that that the problem was that lto_output() was
attempting to copy the function instead of outputting it and that he
would have a look ;-)


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2014-09-23 11:21 ` jamborm at gcc dot gnu.org
@ 2014-09-23 11:38 ` trippels at gcc dot gnu.org
  2014-10-04 22:00 ` hubicka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-09-23 11:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #13 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
A bit more reduced (just testing upcoming creduce release):

class C;
class F {
  virtual C m_fn1();
};
class C {
 public:
  virtual int *m_fn3(int);
};
class G : F, C {
  int offsets;
  int *m_fn3(int);
};
C *a;
int *G::m_fn3(int) {
  if (offsets) return 0;
}

void fn1() {
  for (;;) a->m_fn3(0);
}


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

* [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2014-09-23 11:38 ` trippels at gcc dot gnu.org
@ 2014-10-04 22:00 ` hubicka at gcc dot gnu.org
  2014-10-05  2:53 ` [Bug lto/62026] [5 " hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-10-04 22:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am testing the following for 4.9-branch:
Index: cgraphclones.c
===================================================================
--- cgraphclones.c      (revision 215890)
+++ cgraphclones.c      (working copy)
@@ -310,6 +310,8 @@ duplicate_thunk_for_node (cgraph_node *t
   if (thunk_of->thunk.thunk_p)
     node = duplicate_thunk_for_node (thunk_of, node);

+  cgraph_get_body (thunk);
+
   struct cgraph_edge *cs;
   for (cs = node->callers; cs; cs = cs->next_caller)
     if (cs->caller->thunk.thunk_p
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c  (revision 215890)
+++ lto-streamer-out.c  (working copy)
@@ -2077,7 +2077,10 @@ lto_output (void)
 #endif
              decl_state = lto_new_out_decl_state ();
              lto_push_out_decl_state (decl_state);
-             if (gimple_has_body_p (node->decl) || !flag_wpa)
+             if (gimple_has_body_p (node->decl) || !flag_wpa
+                 /* Thunks have no body but they may be synthetized
+                    at WPA time.  */
+                 || DECL_ARGUMENTS (node->decl))
                output_function (node);
              else
                copy_function (node);


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

* [Bug lto/62026] [5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2014-10-04 22:00 ` hubicka at gcc dot gnu.org
@ 2014-10-05  2:53 ` hubicka at gcc dot gnu.org
  2014-10-15 17:00 ` trippels at gcc dot gnu.org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-10-05  2:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.9/5 Regression] Crash in |[5 Regression] Crash in
                   |lto_get_decl_name_mapping   |lto_get_decl_name_mapping

--- Comment #16 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed on branch


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

* [Bug lto/62026] [5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2014-10-05  2:53 ` [Bug lto/62026] [5 " hubicka at gcc dot gnu.org
@ 2014-10-15 17:00 ` trippels at gcc dot gnu.org
  2014-10-15 17:01 ` hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-15 17:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #17 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Here's a new testcase that fails on ppc64 even with the patch from comment 15
applied to trunk.



trippels@gcc1-power7 genrb % cat timezone.ii
class UnicodeString
{
public:
  void m_fn1 ();
} a;
void
fn1 ()
{
  static int b = 0;
  a.m_fn1 ();
}

trippels@gcc1-power7 genrb % /home/trippels/gcc_test/usr/local/bin/c++ -flto=32
-ffunction-sections -fdata-sections -std=gnu++0x -g -O2 -r -nostdlib
timezone.ii
lto1: internal compiler error: Segmentation fault
0x1063d46b crash_signal
        ../../gcc/gcc/toplev.c:340
0x104ed8c4 lto_get_decl_name_mapping(lto_file_decl_data*, char const*)
        ../../gcc/gcc/lto-section-in.c:340
0x1098f447 varpool_node::get_constructor()
        ../../gcc/gcc/varpool.c:280
0x1098f447 varpool_node::get_constructor()
        ../../gcc/gcc/varpool.c:264
0x10981c4f get_variable_section(tree_node*, bool)
        ../../gcc/gcc/varasm.c:1121
0x10983ae3 get_block_for_decl
        ../../gcc/gcc/varasm.c:1194
0x1098663b make_decl_rtl(tree_node*)
        ../../gcc/gcc/varasm.c:1419
0x10989f43 make_decl_rtl_for_debug(tree_node*)
        ../../gcc/gcc/varasm.c:1467
0x102523f7 rtl_for_decl_location
        ../../gcc/gcc/dwarf2out.c:15760
0x102871e7 loc_list_from_tree
        ../../gcc/gcc/dwarf2out.c:14391
0x1028dc13 add_location_or_const_value_attribute
        ../../gcc/gcc/dwarf2out.c:15892
0x1028dc13 add_location_or_const_value_attribute
        ../../gcc/gcc/dwarf2out.c:15836
0x10297707 dwarf2out_finish
        ../../gcc/gcc/dwarf2out.c:24243
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [/home/trippels/tmp/ccC9suVr.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/home/trippels/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status


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

* [Bug lto/62026] [5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2014-10-15 17:00 ` trippels at gcc dot gnu.org
@ 2014-10-15 17:01 ` hubicka at gcc dot gnu.org
  2014-10-15 17:18 ` trippels at gcc dot gnu.org
  2014-10-15 18:06 ` trippels at gcc dot gnu.org
  19 siblings, 0 replies; 20+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-10-15 17:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #18 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Wed Oct 15 17:01:08 2014
New Revision: 216278

URL: https://gcc.gnu.org/viewcvs?rev=216278&root=gcc&view=rev
Log:

    PR lto/62026
    * lto/pr62026.C: New testcase.

    * cgraphclones.c (duplicate_thunk_for_node): Get body to have args
    to duplicate.
    * lto-streamer-out.c (lto_output): Handle correctly thunks that was born
    at WPA time.

Added:
    trunk/gcc/testsuite/g++.dg/lto/pr62026.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cgraphclones.c
    trunk/gcc/lto-streamer-out.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug lto/62026] [5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2014-10-15 17:01 ` hubicka at gcc dot gnu.org
@ 2014-10-15 17:18 ` trippels at gcc dot gnu.org
  2014-10-15 18:06 ` trippels at gcc dot gnu.org
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-15 17:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

--- Comment #19 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Program received signal SIGSEGV, Segmentation fault.
lto_get_decl_name_mapping (decl_data=0x0, name=0x3fffaf6d4580 "_ZZ3fn1vE1b") at
../../gcc/gcc/lto-section-in.c:340
340     ../../gcc/gcc/lto-section-in.c: No such file or directory.
(gdb) bt
#0  lto_get_decl_name_mapping (decl_data=0x0, name=0x3fffaf6d4580
"_ZZ3fn1vE1b") at ../../gcc/gcc/lto-section-in.c:340
#1  0x000000001098f448 in get_constructor (this=0x3fffaf890080) at
../../gcc/gcc/varpool.c:280
#2  varpool_node::get_constructor (this=0x3fffaf890080) at
../../gcc/gcc/varpool.c:264
#3  0x0000000010981c50 in get_variable_section (decl=0x3fffaf7003f0,
prefer_noswitch_p=<optimized out>) at ../../gcc/gcc/varasm.c:1121
#4  0x0000000010983ae4 in get_block_for_decl (decl=decl@entry=0x3fffaf7003f0)
at ../../gcc/gcc/varasm.c:1194
#5  0x000000001098663c in make_decl_rtl (decl=0x3fffaf7003f0) at
../../gcc/gcc/varasm.c:1419
#6  0x0000000010989f44 in make_decl_rtl_for_debug (decl=0x3fffaf7003f0) at
../../gcc/gcc/varasm.c:1467
#7  0x00000000102523f8 in rtl_for_decl_location
(decl=decl@entry=0x3fffaf7003f0) at ../../gcc/gcc/dwarf2out.c:15760
#8  0x00000000102871e8 in loc_list_from_tree (loc=loc@entry=0x3fffaf7003f0,
want_address=<optimized out>) at ../../gcc/gcc/dwarf2out.c:14391
#9  0x000000001028dc14 in add_location_or_const_value_attribute
(attr=DW_AT_location, cache_p=<optimized out>, decl=0x3fffaf7003f0,
die=0x3fffaf880230)
    at ../../gcc/gcc/dwarf2out.c:15892
#10 add_location_or_const_value_attribute (die=0x3fffaf880230,
decl=0x3fffaf7003f0, cache_p=cache_p@entry=false, attr=DW_AT_location) at
../../gcc/gcc/dwarf2out.c:15836
#11 0x0000000010297708 in dwarf2out_finish (filename=0x112f2440
"/home/trippels/tmp/ccZV1IhN.ltrans0.o") at ../../gcc/gcc/dwarf2out.c:24243
#12 0x000000001063dd80 in compile_file () at ../../gcc/gcc/toplev.c:602
#13 0x0000000010640844 in do_compile () at ../../gcc/gcc/toplev.c:1973
#14 toplev_main (argc=22, argv=0x112f2860) at ../../gcc/gcc/toplev.c:2049
#15 0x0000000010101730 in main (argc=<optimized out>, argv=<optimized out>) at
../../gcc/gcc/main.c:36
(gdb) up
#1  0x000000001098f448 in get_constructor (this=0x3fffaf890080) at
../../gcc/gcc/varpool.c:280
280     ../../gcc/gcc/varpool.c: No such file or directory.
(gdb) up
#2  varpool_node::get_constructor (this=0x3fffaf890080) at
../../gcc/gcc/varpool.c:264
264     in ../../gcc/gcc/varpool.c
(gdb) up
#3  0x0000000010981c50 in get_variable_section (decl=0x3fffaf7003f0,
prefer_noswitch_p=<optimized out>) at ../../gcc/gcc/varasm.c:1121
1121    ../../gcc/gcc/varasm.c: No such file or directory.
(gdb) p debug_tree(decl)
 <var_decl 0x3fffaf7003f0 b
    type <integer_type 0x3fffaf6b07e0 int asm_written public SI
        size <integer_cst 0x3fffaf681380 constant 32>
        unit size <integer_cst 0x3fffaf681398 constant 4>
        align 32 symtab 16383 alias set -1 canonical type 0x3fffaf6b07e0
precision 32 min <integer_cst 0x3fffaf681338 -2147483648> max <integer_cst
0x3fffaf681350 2147483647>
        pointer_to_this <pointer_type 0x3fffaf6b1848>>
    static SI file timezone.ii line 9 col 14 size <integer_cst 0x3fffaf681380
32> unit size <integer_cst 0x3fffaf681398 4>
    align 32 context <function_decl 0x3fffaf843018 fn1> initial <error_mark
0x3fffaf681128>>
$1 = void


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

* [Bug lto/62026] [5 Regression] Crash in lto_get_decl_name_mapping
       [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2014-10-15 17:18 ` trippels at gcc dot gnu.org
@ 2014-10-15 18:06 ` trippels at gcc dot gnu.org
  19 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-15 18:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62026

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #20 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed. I've opened PR63546 for the new issue on ppc64.


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

end of thread, other threads:[~2014-10-15 18:06 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
2014-08-05 19:30 ` [Bug lto/62026] [4.9/4.10 Regression] Crash in lto_get_decl_name_mapping d.g.gorbachev at gmail dot com
2014-08-06  8:58 ` rguenth at gcc dot gnu.org
2014-08-09 14:55 ` trippels at gcc dot gnu.org
2014-08-17  5:27 ` [Bug lto/62026] [4.9/5 " d.g.gorbachev at gmail dot com
2014-08-29  8:40 ` trippels at gcc dot gnu.org
2014-08-29  9:46 ` smf.linux at ntlworld dot com
2014-08-29 10:06 ` trippels at gcc dot gnu.org
2014-08-29 12:54 ` smf.linux at ntlworld dot com
2014-09-03 11:57 ` jamborm at gcc dot gnu.org
2014-09-14 14:57 ` smf.linux at ntlworld dot com
2014-09-14 14:59 ` smf.linux at ntlworld dot com
2014-09-14 15:42 ` trippels at gcc dot gnu.org
2014-09-23 11:21 ` jamborm at gcc dot gnu.org
2014-09-23 11:38 ` trippels at gcc dot gnu.org
2014-10-04 22:00 ` hubicka at gcc dot gnu.org
2014-10-05  2:53 ` [Bug lto/62026] [5 " hubicka at gcc dot gnu.org
2014-10-15 17:00 ` trippels at gcc dot gnu.org
2014-10-15 17:01 ` hubicka at gcc dot gnu.org
2014-10-15 17:18 ` trippels at gcc dot gnu.org
2014-10-15 18:06 ` trippels 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).