This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/69438] [6 Regression] ICE with noreturn and function that return non-POD


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

--- Comment #4 from Abe <abe_skolnik at yahoo dot com> ---
(In reply to Andrew Pinski from comment #2)
> Confirmed, reduced testcase:
> __attribute__((noreturn)) void V8_Fatal(int);
> struct Register {
>     Register(const Register& r) {    }
> };
> Register fp_register() {
>    V8_Fatal(0);
> }
> Register constant_pool_pointer_register() {
>    V8_Fatal(0);
> }

Very interesting...  I was able to reduce this to:

  __attribute__((noreturn)) void V(int);
  struct R{R(const R&r){}};
  R f(){V(0);}
  R c(){V(0);}

... which still ICEs, with sufficient "-O", but removing the last line, i.e.
trying the following:

  __attribute__((noreturn)) void V(int);
  struct R{R(const R&r){}};
  R f(){V(0);}

... does _not_ ICE.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]