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

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Pengfei Li from comment #13)
> Just tried with Andrew's patch:
> https://forge.sourceware.org/gcc/gcc-TEST/pulls/77/commits
> 
> An ICE appears after applying it.
> 
> during GIMPLE pass: forwprop
> a.cc: In function ‘int8x16_t foo()’:
> a.cc:15:1: internal compiler error: Segmentation fault
>    15 | }
>       | ^
> 0x3e99623 internal_error(char const*, ...)
>       /home/penli02/src/gcc/gcc/diagnostic-global-context.cc:786
> 0x1fed5ff crash_signal
>       /home/penli02/src/gcc/gcc/toplev.cc:323
> 0x101f000 tree_check(tree_node*, char const*, int, char const*, tree_code)
>       /home/penli02/src/gcc/gcc/tree.h:3732
> 0x175a2d7 first_imm_use_stmt(imm_use_iterator*, tree_node*)
>       /home/penli02/src/gcc/gcc/ssa-iterators.h:931
> 0x21e463b optimize_agr_copyprop
>       /home/penli02/src/gcc/gcc/tree-ssa-forwprop.cc:1741
> 0x21f4fd3 execute
>       /home/penli02/src/gcc/gcc/tree-ssa-forwprop.cc:5299
> 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.
> 
> Here's the reduced test case triggering the ICE:
> 
> typedef __Int8x16_t int8x16_t;
> 
> typedef struct {
>   int8x16_t i8;
> } neon_vec;
> 
> neon_vec get_vec() {
>   neon_vec r;
>   return r;
> }
> 
> int8x16_t foo() {
>   neon_vec r = get_vec();
>   return r.i8;
> }

Thanks for testing. I think this was a bug in
https://forge.sourceware.org/gcc/gcc-TEST/pulls/77/commits/49ae53b9e9ac5ffcd21ca6425be8842dfd9e3145
which I fixed as that patch has already been applied to the trunk.  I will be
finishing up the other commits by the end of next week.

Reply via email to