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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Martin Liška from comment #2)
> > Started with r13-1204-gd68d366425369649.
> 
> Since -funreachable-traps is a new option, is this a regression then?

I have a new test-case that does not need the option:

$ cat new-alias.cpp
using size_t = decltype(sizeof(0));
extern "C" char *something(long long x) {}
void *operator new(size_t) __attribute__((alias("something")));
int *pr16715 = new int;

$ g++ new-alias.cpp -c -Og
new-alias.cpp: In function ‘char* something(long long int)’:
new-alias.cpp:2:42: warning: no return statement in function returning non-void
[-Wreturn-type]
    2 | extern "C" char *something(long long x) {}
      |                                          ^
new-alias.cpp: At global scope:
new-alias.cpp:3:7: warning: ‘void* operator new(size_t)’ alias between
functions of incompatible types ‘void*(size_t)’ {aka ‘void*(long unsigned
int)’} and ‘char*(long long int)’ [-Wattribute-alias=]
    3 | void *operator new(size_t) __attribute__((alias("something")));
      |       ^~~~~~~~
new-alias.cpp:2:18: note: aliased declaration here
    2 | extern "C" char *something(long long x) {}
      |                  ^~~~~~~~~
during GIMPLE pass: local-pure-const
new-alias.cpp: In function ‘void __static_initialization_and_destruction_0()’:
new-alias.cpp:4:23: internal compiler error: in execute_todo, at passes.cc:2140
    4 | int *pr16715 = new int;
      |                       ^
0x17450d1 execute_todo
        /home/marxin/Programming/gcc/gcc/passes.cc:2140
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to