https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808
Bug ID: 96808 Summary: MMA built-in dies with incorrect sharing of tree nodes error Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: bergner at gcc dot gnu.org Target Milestone: --- bergner@pike:~/$ cat bug.c void test (__vector_quad *dst, vector unsigned char vc) { __vector_quad vq[2]; __builtin_mma_xxsetaccz(&vq[1]); __builtin_mma_xvf32gerpp(&vq[1], vc, vc); *dst = vq[1]; } bergner@pike:~/$ gcc -S -O2 -mcpu=power10 bug.c bug.c: In function ‘test’: bug.c:2:1: error: incorrect sharing of tree nodes 2 | test (__vector_quad *dst, vector unsigned char vc) | ^~~~ MEM[(__vector_quad *)&vq + 64B] MEM[(__vector_quad *)&vq + 64B] = _4; during GIMPLE pass: cfg bug.c:2:1: internal compiler error: verify_gimple failed 0x11337297 verify_gimple_in_cfg(function*, bool) /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/tree-cfg.c:5491 0x10ffb54f execute_function_todo /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/passes.c:1992 0x10ff9da3 do_per_function /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/passes.c:1640 0x10ffb867 execute_todo /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/passes.c:2046 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. This is a bug in rs6000_gimple_fold_mma_builtin not expecting to handle an array of accumulators. Mine. This dies on trunk and GCC 10.