public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping
Date: Sun, 14 Sep 2014 15:42:00 -0000	[thread overview]
Message-ID: <bug-62026-4-bM6IVTIYx9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-62026-4@http.gcc.gnu.org/bugzilla/>

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.


  parent reply	other threads:[~2014-09-14 15:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-62026-4@http.gcc.gnu.org/bugzilla/>
2014-08-05 19:30 ` [Bug lto/62026] [4.9/4.10 " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-62026-4-bM6IVTIYx9@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).