public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66896] New: ipa-prop.c:2479 runtime error: member call on null pointer of type 'struct ipa_polymorphic_call_context'
@ 2015-07-16  8:11 zeccav at gmail dot com
  2015-07-16  9:37 ` [Bug ipa/66896] " marxin at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: zeccav at gmail dot com @ 2015-07-16  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66896
           Summary: ipa-prop.c:2479 runtime error: member call on null
                    pointer of type 'struct ipa_polymorphic_call_context'
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com
  Target Milestone: ---

//must be compiled with -O2 , or "-O[1] -fdevirtualize"
//ipa-prop.c:2479:30: runtime error: member call on null pointer of type
'struct ipa_polymorphic_call_context'
//gcc ipa-prop.c source line "dst_ctx->combine_with (ctx);"
//because dst_ctx is NULL
//double checked with "gcc_assert(dst_ctx);"
void f2 (void *);
void f3 ();

struct A
{
  int *a;
  A ();
  ~A () { a3 (); }
  int a1 (int * p) { if (!p) f3 (); f2 (p); }
  void a3 () { if (*a) a1 (a); }
};

struct B : A {~B () { a3 ();}};

struct F {};

struct G : F {B g;};

void foo () {G g;}


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

end of thread, other threads:[~2015-08-06  6:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16  8:11 [Bug c++/66896] New: ipa-prop.c:2479 runtime error: member call on null pointer of type 'struct ipa_polymorphic_call_context' zeccav at gmail dot com
2015-07-16  9:37 ` [Bug ipa/66896] " marxin at gcc dot gnu.org
2015-07-16 14:48 ` marxin at gcc dot gnu.org
2015-07-16 14:53 ` marxin at gcc dot gnu.org
2015-07-17  6:36 ` zeccav at gmail dot com
2015-07-23  8:28 ` zeccav at gmail dot com
2015-07-24 11:34 ` jamborm at gcc dot gnu.org
2015-07-24 14:02 ` zeccav at gmail dot com
2015-07-24 14:03 ` zeccav at gmail dot com
2015-07-24 16:08 ` jamborm at gcc dot gnu.org
2015-07-24 17:24 ` zeccav at gmail dot com
2015-08-05 15:56 ` marxin at gcc dot gnu.org
2015-08-06  6:24 ` zeccav at gmail dot com

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