public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109473] New: ICE during GIMPLE pass: vect: verify_gimple failed with -m32
@ 2023-04-11 14:48 arsen at gcc dot gnu.org
  2023-04-11 14:55 ` [Bug tree-optimization/109473] ICE during GIMPLE pass: vect: verify_gimple failed with -O1 -ftree-loop-vectorize arsen at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: arsen at gcc dot gnu.org @ 2023-04-11 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109473
           Summary: ICE during GIMPLE pass: vect: verify_gimple failed
                    with -m32
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arsen at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54831
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54831&action=edit
reduced reproducer

detected initially while building PipeWire, the attached code compiled with
-m32 -march=x86-64 -O1 -ftree-loop-vectorize produces an ICE:

~/gcc/scratch_build/gcc 4 $ ./cc1 -quiet ccGrpuMH.out -m32 -march=x86-64 -O1
-ftree-loop-vectorize
ccGrpuMH.out: In function ‘do_port_use_buffers’:
ccGrpuMH.out:9:14: warning: comparison between pointer and integer
    9 |     for (; j < buffers; j++)
      |              ^
ccGrpuMH.out:10:14: warning: assignment to ‘void *’ from ‘unsigned int’ makes
pointer from integer without a cast [-Wint-conversion]
   10 |       endptr = (__UINTPTR_TYPE__)endptr + buffers[i]->metas[j];
      |              ^
ccGrpuMH.out:11:16: warning: comparison of distinct pointer types lacks a cast
   11 |     if (endptr > mem)
      |                ^
ccGrpuMH.out:4:6: error: invalid (pointer) operands ‘plus_expr’
    4 | void do_port_use_buffers(struct spa_buffer **buffers) {
      |      ^~~~~~~~~~~~~~~~~~~
_77 = stmp_endptr_23.18_76 + endptr_15;
during GIMPLE pass: vect
ccGrpuMH.out:4:6: internal compiler error: verify_gimple failed
0x142f352 verify_gimple_in_cfg(function*, bool, bool)
        ../../scratch/gcc/tree-cfg.cc:5648
0x12d1050 execute_function_todo
        ../../scratch/gcc/passes.cc:2098
0x12d15be execute_todo
        ../../scratch/gcc/passes.cc:2152
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.

~/gcc/scratch_build/gcc 4 $ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../scratch/configure --disable-bootstrap
--enable-checking=yes,rtl,tree --enable-languages=c,c++ --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230411 (experimental) (GCC)
~/gcc/scratch_build/gcc$ echo -n g:; git -C ../../scratch rev-parse HEAD^
g:b8e32978e3d9e3b88cd4f441edfdebfa395a5c26

(the commit applied on top of this is a maintainer-scripts/ edit)

I don't have a vanilla build of current releases/gcc-12, but it seems that it
is affected too:

~/gcc/scratch_build/gcc 1 $ gcc-12 --version
gcc-12 (Gentoo Hardened 12.2.1_p20230408 p14) 12.2.1 20230408
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~/gcc/scratch_build/gcc$ gcc-12 -x c -S -o - ccGrpuMH.out -m32 -march=x86-64
-O1 -ftree-loop-vectorize
        .file   "ccGrpuMH.out"
ccGrpuMH.out: In function ‘do_port_use_buffers’:
ccGrpuMH.out:9:14: warning: comparison between pointer and integer
    9 |     for (; j < buffers; j++)
      |              ^
ccGrpuMH.out:10:14: warning: assignment to ‘void *’ from ‘unsigned int’ makes
pointer from integer without a cast [-Wint-conversion]
   10 |       endptr = (__UINTPTR_TYPE__)endptr + buffers[i]->metas[j];
      |              ^
ccGrpuMH.out:11:16: warning: comparison of distinct pointer types lacks a cast
   11 |     if (endptr > mem)
      |                ^
        .text
ccGrpuMH.out:4:6: error: invalid (pointer) operands ‘plus_expr’
    4 | void do_port_use_buffers(struct spa_buffer **buffers) {
      |      ^~~~~~~~~~~~~~~~~~~
_77 = stmp_endptr_23.18_76 + endptr_15;
during GIMPLE pass: vect
ccGrpuMH.out:4:6: internal compiler error: verify_gimple failed
0xe96d34 verify_gimple_in_cfg(function*, bool)
       
/usr/src/debug/sys-devel/gcc-12.2.1_p20230408/gcc-12-20230408/gcc/tree-cfg.cc:5561
0xd5c927 execute_function_todo
       
/usr/src/debug/sys-devel/gcc-12.2.1_p20230408/gcc-12-20230408/gcc/passes.cc:2085
0xd5ca51 execute_todo
       
/usr/src/debug/sys-devel/gcc-12.2.1_p20230408/gcc-12-20230408/gcc/passes.cc:2139
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.

but, earlier gcc-12 seems unaffected:
~/gcc/releases/gcc-12b/gcc$ ./cc1 -quiet ccGrpuMH.out -m32 -march=x86-64 -O1
-ftree-loop-vectorize
ccGrpuMH.out: In function ‘do_port_use_buffers’:
ccGrpuMH.out:9:14: warning: comparison between pointer and integer
    9 |     for (; j < buffers; j++)
      |              ^
ccGrpuMH.out:10:14: warning: assignment to ‘void *’ from ‘unsigned int’ makes
pointer from integer without a cast [-Wint-conversion]
   10 |       endptr = (__UINTPTR_TYPE__)endptr + buffers[i]->metas[j];
      |              ^
ccGrpuMH.out:11:16: warning: comparison of distinct pointer types lacks a cast
   11 |     if (endptr > mem)
      |                ^
~/gcc/releases/gcc-12b/gcc$ ./xgcc --version
xgcc (GCC) 12.2.1 20230313
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/gcc/releases/gcc-12b/gcc$ git -C ../../gcc-12 gcc-descr HEAD
r12-9248-g775be7d6cb5517


apologies for the lack of bisect - i'm in a time crunch

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

end of thread, other threads:[~2023-07-07 10:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11 14:48 [Bug tree-optimization/109473] New: ICE during GIMPLE pass: vect: verify_gimple failed with -m32 arsen at gcc dot gnu.org
2023-04-11 14:55 ` [Bug tree-optimization/109473] ICE during GIMPLE pass: vect: verify_gimple failed with -O1 -ftree-loop-vectorize arsen at gcc dot gnu.org
2023-04-11 15:13 ` [Bug tree-optimization/109473] [10/11/12/13 Regression] " jakub at gcc dot gnu.org
2023-04-12  8:00 ` [Bug tree-optimization/109473] [10/11/12/13 Regression] ICE during GIMPLE pass: vect: verify_gimple failed with -O1 -ftree-loop-vectorize since r10-4076-g82e8e335f917b9 rguenth at gcc dot gnu.org
2023-04-12  8:06 ` jakub at gcc dot gnu.org
2023-04-12 10:23 ` cvs-commit at gcc dot gnu.org
2023-04-12 10:24 ` [Bug tree-optimization/109473] [10/11/12 " rguenth at gcc dot gnu.org
2023-04-12 10:53 ` arsen at gcc dot gnu.org
2023-04-17  9:14 ` cvs-commit at gcc dot gnu.org
2023-05-02 12:03 ` [Bug tree-optimization/109473] [10/11 " cvs-commit at gcc dot gnu.org
2023-05-03  8:45 ` [Bug tree-optimization/109473] [10 " jakub at gcc dot gnu.org
2023-05-03 10:14 ` cvs-commit at gcc dot gnu.org
2023-07-07 10:07 ` rguenth at gcc dot gnu.org

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