public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479
@ 2021-11-15 11:11 marxin at gcc dot gnu.org
  2021-11-15 11:21 ` [Bug target/103248] " pinskia at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-15 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103248
           Summary: ICE in operation_could_trap_helper_p, at
                    tree-eh.c:2479
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: arm-linux-gnueabi

The following fails:

$ arm-linux-gnueabi-g++
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/abi/vbase8-22.C
-ftrivial-auto-var-init=pattern
warning: NEW ICE #1: in operation_could_trap_helper_p, at tree-eh.c:2479
timeout 10 arm-linux-gnueabi-gcc  -fmax-errors=1
-I/home/marxin/Programming/llvm-project/libcxx/test/support/ -Wno-overflow -O1
/home/marxin/Programming/llvm-project/clang/test/Frontend/fixed_point_compound.c
-fipa-cp-clone --param=builtin-expect-probability=100
--param=min-size-for-stack-sharing=2147483647 -floop-interchange -Wno-varargs
-Wno-builtin-declaration-mismatch -fno-printf-return-value
--param=max-stores-to-sink=1585089593 -Wno-c99-c11-compat
--param=loop-max-datarefs-for-datadeps=1582034702 -ftree-cselim
-Wignored-qualifiers -fno-sched-pressure -fno-tree-reassoc
-fno-split-ivs-in-unroller -floop-nest-optimize
--param=uninlined-function-time=1000000 -freciprocal-math
--param=scev-max-expr-size=0 -mthumb-interwork
--param=lra-max-considered-reload-pseudos=2147483647
--param=max-rtl-if-conversion-predictable-cost=62 -Wno-stringop-overread
-fcrossjumping -Wsystem-headers --param=hot-bb-frequency-fraction=950292743
--param=builtin-expect-probability=100 -Wstrict-aliasing=1
-Wvector-operation-performance -Wmemset-elt-size -fno-ira-share-spill-slots
-mword-relocations -mtp=cp15 -finline-small-functions
--param=min-loop-cond-split-prob=0 -Wno-varargs --param=lim-expensive=633593234
--param=iv-max-considered-uses=0 -fno-move-loop-invariants -fira-loop-pressure
--param=max-isl-operations=1856947825 --param=hwasan-random-frame-tag=1
-funconstrained-commons -Wno-analyzer-write-to-const
--param=inline-heuristics-hint-percent=67117 -flifetime-dse=0
--param=loop-block-tile-size=0 --param=dse-max-object-size=729093725
-fno-tree-sink -Wmissing-field-initializers -Wno-invalid-memory-model
-Wswitch-enum -fmodulo-sched-allow-regmoves -Wuninitialized -Wno-overflow
-falign-labels -fno-stdarg-opt -ftree-cselim -fpeephole2 -Wimplicit
--param=store-merging-allow-unaligned=0 -fno-cprop-registers
-Wno-int-conversion -Wcast-align --param=max-unswitch-level=2147483647
-fpeel-loops -fno-lifetime-dse -fsel-sched-pipelining-outer-loops
--param=hwasan-instrument-writes=1 --param=max-sched-insn-conflict-delay=10
-Wtype-limits --param=ira-max-conflict-table-size=0 -Wno-enum-compare
-Wno-endif-labels -fno-tree-loop-im -Wno-invalid-memory-model
--param=parloops-min-per-thread=2 -Wno-overflow -Wsequence-point
--param=avg-loop-niter=65536 -Wno-stringop-overread
-Wno-declaration-after-statement --param=modref-max-adjustments=23
-Wformat-zero-length -Wno-analyzer-file-leak -Wfloat-conversion -Wtrampolines
--param=align-loop-iterations=0 --param=unroll-jam-max-unroll=0
-Wsign-conversion --param=switch-conversion-max-branch-ratio=33837
-frounding-math --param=max-slsr-cand-scan=825635 -Waddress
-fno-ira-share-save-slots --param=modref-max-bases=2147483647 -funswitch-loops
-Wunused-parameter --param=min-inline-recursive-probability=0
--param=ipa-cp-loop-hint-bonus=944444867 -Wno-return-local-addr
--param=max-goto-duplication-insns=2144133459 -Wno-free-nonheap-object
-Wno-switch-bool -Wno-address-of-packed-member -Wnonnull-compare
-Wno-analyzer-null-argument --param=tracer-max-code-growth=2147483647
-Wbool-compare --param=max-peel-branches=1838480161 -funconstrained-commons
-Wmissing-field-initializers --param=vect-inner-loop-cost-factor=1
--param=max-dse-active-local-stores=0 -Wdate-time
--param=large-stack-frame-growth=1456052770
--param=iv-consider-all-candidates-bound=0 -frerun-cse-after-loop
--param=analyzer-bb-explosion-factor=2147483647
--param=gcse-after-reload-critical-fraction=0
--param=uninlined-thunk-time=24688 -Wenum-conversion -fsched-stalled-insns
-Wjump-misses-init --param=large-function-growth=0
-Wno-analyzer-exposure-through-output-file --param=max-partial-antic-length=0
-Wwrite-strings --param=iv-max-considered-uses=831437445 -Wformat-y2k
--param=max-grow-copy-bb-insns=0 --param=max-last-value-rtl=1973541945
--param=min-nondebug-insn-uid=898 --param=sra-max-scalarization-size-Ospeed=0
-Wformat-security --param=max-last-value-rtl=1538677469
--param=unroll-jam-min-percent=100 -flifetime-dse=1
--param=inline-heuristics-hint-percent=100 -Wno-analyzer-null-dereference
-Wno-if-not-aligned --param=hwasan-instrument-reads=1
--param=vect-partial-vector-usage=0 -frerun-cse-after-loop -Wcomment
-fno-tree-coalesce-vars --param=max-tree-if-conversion-phi-args=2 -fipa-vrp
--param=sra-max-scalarization-size-Osize=2147483647
--param=analyzer-bb-explosion-factor=93678980 -Wno-cpp
--param=ipa-max-switch-predicate-bounds=0
--param=dse-max-object-size=2147483647 --param=tm-max-aggregate-size=1061172261
-flive-range-shrinkage -falign-functions --param=gcse-unrestricted-cost=0
-Wnonnull -fnon-call-exceptions
--param=jump-table-max-growth-ratio-for-size=1000 -finline-functions
--param=ipa-cp-recursion-penalty=100
--param=iv-always-prune-cand-set-bound=2147483647
--param=tracer-dynamic-coverage-feedback=3
--param=cxx-max-namespaces-for-diagnostic-help=0
--param=hwasan-random-frame-tag=1 --param=modref-max-bases=2147483647
-fno-ipa-modref -Wdangling-else -fno-dce -Wmultistatement-macros
--param=jump-table-max-growth-ratio-for-size=466 -fstack-clash-protection
-Wzero-length-bounds -Warray-bounds
--param=tracer-min-branch-probability-feedback=51 -fsimd-cost-model=very-cheap
--param=partial-inlining-entry-probability=0 -fno-tree-ch -Wno-sync-nand
-Wno-sizeof-array-argument --param=inline-heuristics-hint-percent=552091
-fno-stdarg-opt -Wsizeof-pointer-div -Wshadow=compatible-local
--param=max-inline-insns-recursive-auto=0 -fvariable-expansion-in-unroller
--param=min-spec-prob=0 --param=ira-max-conflict-table-size=1261775574
-Wduplicated-cond --param=avoid-fma-max-bits=0
-fsel-sched-pipelining-outer-loops --param=l1-cache-size=0
-fisolate-erroneous-paths-attribute -fno-sched-last-insn-heuristic -Wno-tsan
-fno-bit-tests -Wno-scalar-storage-order --param=max-stores-to-sink=2147483647
--param=analyzer-max-recursion-depth=0 -o/dev/null -S
634 | void div_ai() {
|      ^~~~~~
0xdeadbeef operation_could_trap_helper_p(tree_code, bool, bool, bool, bool,
tree_node*, bool*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2479
0xdeadbeef stmt_could_throw_1_p
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2891
0xdeadbeef stmt_could_throw_p(function*, gimple*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2941
0xdeadbeef stmt_could_throw_p(function*, gimple*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2913
0xdeadbeef lower_eh_constructs_2
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2058
0xdeadbeef lower_eh_constructs_1
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2153
0xdeadbeef execute
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2198

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
@ 2021-11-15 11:21 ` pinskia at gcc dot gnu.org
  2021-11-15 11:24 ` marxin at gcc dot gnu.org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-15 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
0xdeadbeef

Not a gc issue which a5a5a5a5 pattern.

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
  2021-11-15 11:21 ` [Bug target/103248] " pinskia at gcc dot gnu.org
@ 2021-11-15 11:24 ` marxin at gcc dot gnu.org
  2021-11-15 12:12 ` rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-15 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> 0xdeadbeef

It's my string replacement, the original back-trace contains normal addresses.

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
  2021-11-15 11:21 ` [Bug target/103248] " pinskia at gcc dot gnu.org
  2021-11-15 11:24 ` marxin at gcc dot gnu.org
@ 2021-11-15 12:12 ` rguenth at gcc dot gnu.org
  2021-11-15 12:16 ` marxin at gcc dot gnu.org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-15 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
With just -ftrivial-auto-var-init=pattern I see and ICE in

during GIMPLE pass: lower
vbase8-22.C: In function 'int main()':
vbase8-22.C:69:1: internal compiler error: in clear_padding_type, at
gimple-fold.c:4804
0x12d6a63 clear_padding_type
        /home/rguenther/src/trunk/gcc/gimple-fold.c:4804
0x12d69da clear_padding_type
        /home/rguenther/src/trunk/gcc/gimple-fold.c:4799
0x12d7b91 gimple_fold_builtin_clear_padding
        /home/rguenther/src/trunk/gcc/gimple-fold.c:5006
0x12d8335 gimple_fold_builtin
        /home/rguenther/src/trunk/gcc/gimple-fold.c:5180
0x12da469 gimple_fold_call
        /home/rguenther/src/trunk/gcc/gimple-fold.c:5588

cut&pasting all arguments you list doesn't change that, so ...?  How did you
configure GCC?  I have --target=arm-none-linux-gnueabihf --with-float=hard
--with-cpu=cortex-a9 --with-fpu=neon-fp16

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-15 12:12 ` rguenth at gcc dot gnu.org
@ 2021-11-15 12:16 ` marxin at gcc dot gnu.org
  2021-11-15 12:26 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-15 12:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/home/marxin/BIG/bin/arm/dev/shm/buildbot/install/gcc/bin/arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/marxin/BIG/bin/arm/dev/shm/buildbot/install/gcc/bin/../libexec/gcc/arm-linux-gnueabi/12.0.0/lto-wrapper
Target: arm-linux-gnueabi
Configured with:
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/configure
--enable-languages=c,c++,fortran --disable-bootstrap --disable-libsanitizer
--disable-multilib --enable-checking=release
--prefix=/dev/shm/buildbot/install/gcc --target=arm-linux-gnueabi
--with-as=/usr/bin/arm-suse-linux-gnueabi-as
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211113 (experimental)
ecdf414bd89e6ba251f6b3f494407139b4dbae0e (GCC)

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-11-15 12:16 ` marxin at gcc dot gnu.org
@ 2021-11-15 12:26 ` rguenth at gcc dot gnu.org
  2021-11-15 12:33 ` marxin at gcc dot gnu.org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-15 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can't reproduce.  Can you please post the cc1plus command-line as produced by
-v?

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-11-15 12:26 ` rguenth at gcc dot gnu.org
@ 2021-11-15 12:33 ` marxin at gcc dot gnu.org
  2021-11-15 12:54 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-15 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Sorry!! I copied totally wrong command line, so it's:

~/BIG/bin/arm/dev/shm/buildbot/install/gcc/bin/arm-linux-gnueabi-gcc
/home/marxin/Programming/llvm-project/clang/test/Frontend/fixed_point_compound.c
-fnon-call-exceptions
during GIMPLE pass: eh
/home/marxin/Programming/llvm-project/clang/test/Frontend/fixed_point_compound.c:
In function ‘div_ai’:
/home/marxin/Programming/llvm-project/clang/test/Frontend/fixed_point_compound.c:634:6:
internal compiler error: in operation_could_trap_helper_p, at tree-eh.c:2479
  634 | void div_ai() {
      |      ^~~~~~
0x614ff8 operation_could_trap_helper_p(tree_code, bool, bool, bool, bool,
tree_node*, bool*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2479
0xbd4407 stmt_could_throw_1_p
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2891
0xbd4407 stmt_could_throw_p(function*, gimple*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2941
0xbd628a stmt_could_throw_p(function*, gimple*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2913
0xbd628a lower_eh_constructs_2
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2058
0xbd8c5e lower_eh_constructs_1
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2153
0xbd8c5e execute
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/tree-eh.c:2198
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.

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-11-15 12:33 ` marxin at gcc dot gnu.org
@ 2021-11-15 12:54 ` jakub at gcc dot gnu.org
  2021-11-16  9:26 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-15 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> With just -ftrivial-auto-var-init=pattern I see and ICE in
> 
> during GIMPLE pass: lower
> vbase8-22.C: In function 'int main()':
> vbase8-22.C:69:1: internal compiler error: in clear_padding_type, at
> gimple-fold.c:4804
> 0x12d6a63 clear_padding_type
>         /home/rguenther/src/trunk/gcc/gimple-fold.c:4804
> 0x12d69da clear_padding_type
>         /home/rguenther/src/trunk/gcc/gimple-fold.c:4799
> 0x12d7b91 gimple_fold_builtin_clear_padding
>         /home/rguenther/src/trunk/gcc/gimple-fold.c:5006
> 0x12d8335 gimple_fold_builtin
>         /home/rguenther/src/trunk/gcc/gimple-fold.c:5180
> 0x12da469 gimple_fold_call
>         /home/rguenther/src/trunk/gcc/gimple-fold.c:5588
> 
> cut&pasting all arguments you list doesn't change that, so ...?  How did you
> configure GCC?  I have --target=arm-none-linux-gnueabihf --with-float=hard
> --with-cpu=cortex-a9 --with-fpu=neon-fp16

I've filed PR103249 for the above.

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-11-15 12:54 ` jakub at gcc dot gnu.org
@ 2021-11-16  9:26 ` rguenth at gcc dot gnu.org
  2021-11-16  9:30 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-16  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-11-16
             Status|UNCONFIRMED                 |WAITING

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
can you also attach fixed_point_compound.c please?

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-11-16  9:26 ` rguenth at gcc dot gnu.org
@ 2021-11-16  9:30 ` marxin at gcc dot gnu.org
  2021-11-16  9:30 ` marxin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-16  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #8)
> can you also attach fixed_point_compound.c please?

Sorry, it's from LLVM, reduced test-case:

$ cat fixed_point_compound.c
_Accum sa;
int c;

void div_csa() { c /= sa; }

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

* [Bug target/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2021-11-16  9:30 ` marxin at gcc dot gnu.org
@ 2021-11-16  9:30 ` marxin at gcc dot gnu.org
  2021-11-16 10:44 ` [Bug middle-end/103248] " rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-16  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|WAITING                     |UNCONFIRMED

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

* [Bug middle-end/103248] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2021-11-16  9:30 ` marxin at gcc dot gnu.org
@ 2021-11-16 10:44 ` rguenth at gcc dot gnu.org
  2021-11-16 12:49 ` [Bug middle-end/103248] [12 Regression] " rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-16 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
                 CC|                            |jsm28 at gcc dot gnu.org
          Component|target                      |middle-end
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we're using RDIV_EXPR for

<fixed_point_type 0x7ffff65610a8 long _Accum>

integer_zerop does not handle FIXED_CST, so previously we considered
all fixed point divisions by constants as not trapping and by non-constants
as trapping.  I can fix that at least as far as using fixed_zerop but I'm not
sure of the fixed point behavior.

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

* [Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2021-11-16 10:44 ` [Bug middle-end/103248] " rguenth at gcc dot gnu.org
@ 2021-11-16 12:49 ` rguenth at gcc dot gnu.org
  2021-11-17  0:32 ` joseph at codesourcery dot com
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-16 12:49 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
            Summary|ICE in                      |[12 Regression] ICE in
                   |operation_could_trap_helper |operation_could_trap_helper
                   |_p, at tree-eh.c:2479       |_p, at tree-eh.c:2479
   Target Milestone|---                         |12.0

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

* [Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2021-11-16 12:49 ` [Bug middle-end/103248] [12 Regression] " rguenth at gcc dot gnu.org
@ 2021-11-17  0:32 ` joseph at codesourcery dot com
  2021-11-19  8:36 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: joseph at codesourcery dot com @ 2021-11-17  0:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Division by zero is undefined behavior for fixed-point types the same way 
as it is for integer types (but not floating point, at least when 
infinities and NaN are supported).  Treating it like integer division in 
the compiler would seem reasonable.

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

* [Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2021-11-17  0:32 ` joseph at codesourcery dot com
@ 2021-11-19  8:36 ` cvs-commit at gcc dot gnu.org
  2021-11-19  8:36 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-19  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:fb15abdc9b61a0b7fa24a37f85d19dc449cfd5bf

commit r12-5395-gfb15abdc9b61a0b7fa24a37f85d19dc449cfd5bf
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Nov 16 11:47:26 2021 +0100

    middle-end/103248 - fix RDIV_EXPR handling with fixed point

    This fixes the previous adjustment to operation_could_trap_helper_p
    where I failed to realize that RDIV_EXPR is also used for
    fixed-point types.  It also fixes that handling by properly
    checking for a fixed_zerop divisor.

    2021-11-16  Richard Biener  <rguenther@suse.de>

            PR middle-end/103248
            * tree-eh.c (operation_could_trap_helper_p): Properly handle
            fixed-point RDIV_EXPR.

            * gcc.dg/pr103248.c: New testcase.

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

* [Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2021-11-19  8:36 ` cvs-commit at gcc dot gnu.org
@ 2021-11-19  8:36 ` rguenth at gcc dot gnu.org
  2021-11-22  8:00 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-19  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

* [Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2021-11-19  8:36 ` rguenth at gcc dot gnu.org
@ 2021-11-22  8:00 ` cvs-commit at gcc dot gnu.org
  2022-02-17 10:48 ` cvs-commit at gcc dot gnu.org
  2022-02-17 11:57 ` cvs-commit at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-22  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:2f0c8f74daef93c0c7b33294213e7db6df58c4d1

commit r11-9259-g2f0c8f74daef93c0c7b33294213e7db6df58c4d1
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Nov 11 09:40:36 2021 +0100

    middle-end/103181 - fix operation_could_trap_p for vector division

    For integer vector division we only checked for all zero vector
    constants rather than checking whether any element in the constant
    vector is zero.

    It also fixes the adjustment to operation_could_trap_helper_p
    where I failed to realize that RDIV_EXPR is also used for
    fixed-point types.  It also fixes that handling by properly
    checking for a fixed_zerop divisor.

    2021-11-11  Richard Biener  <rguenther@suse.de>

            PR middle-end/103181
            PR middle-end/103248
            * tree-eh.c (operation_could_trap_helper_p): Properly
            check vector constants for a zero element for integer
            division.  Separate floating point and integer division code.
            Properly handle fixed-point RDIV_EXPR.

            * gcc.dg/torture/pr103181.c: New testcase.
            * gcc.dg/pr103248.c: Likewise.

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

* [Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2021-11-22  8:00 ` cvs-commit at gcc dot gnu.org
@ 2022-02-17 10:48 ` cvs-commit at gcc dot gnu.org
  2022-02-17 11:57 ` cvs-commit at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-17 10:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:5f5c26a2f02572996efd2b2de0dd5600ad7e91e7

commit r10-10464-g5f5c26a2f02572996efd2b2de0dd5600ad7e91e7
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Nov 11 09:40:36 2021 +0100

    middle-end/103181 - fix operation_could_trap_p for vector division

    For integer vector division we only checked for all zero vector
    constants rather than checking whether any element in the constant
    vector is zero.

    It also fixes the adjustment to operation_could_trap_helper_p
    where I failed to realize that RDIV_EXPR is also used for
    fixed-point types.  It also fixes that handling by properly
    checking for a fixed_zerop divisor.

    2021-11-11  Richard Biener  <rguenther@suse.de>

            PR middle-end/103181
            PR middle-end/103248
            * tree-eh.c (operation_could_trap_helper_p): Properly
            check vector constants for a zero element for integer
            division.  Separate floating point and integer division code.
            Properly handle fixed-point RDIV_EXPR.

            * gcc.dg/torture/pr103181.c: New testcase.
            * gcc.dg/pr103248.c: Likewise.

    (cherry picked from commit 2f0c8f74daef93c0c7b33294213e7db6df58c4d1)

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

* [Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
  2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2022-02-17 10:48 ` cvs-commit at gcc dot gnu.org
@ 2022-02-17 11:57 ` cvs-commit at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-17 11:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:1ac5fbea476e4ebd6a0086ccfbf92e648768be7b

commit r9-9955-g1ac5fbea476e4ebd6a0086ccfbf92e648768be7b
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Nov 11 09:40:36 2021 +0100

    middle-end/103181 - fix operation_could_trap_p for vector division

    For integer vector division we only checked for all zero vector
    constants rather than checking whether any element in the constant
    vector is zero.

    It also fixes the adjustment to operation_could_trap_helper_p
    where I failed to realize that RDIV_EXPR is also used for
    fixed-point types.  It also fixes that handling by properly
    checking for a fixed_zerop divisor.

    2021-11-11  Richard Biener  <rguenther@suse.de>

            PR middle-end/103181
            PR middle-end/103248
            * tree-eh.c (operation_could_trap_helper_p): Properly
            check vector constants for a zero element for integer
            division.  Separate floating point and integer division code.
            Properly handle fixed-point RDIV_EXPR.

            * gcc.dg/torture/pr103181.c: New testcase.
            * gcc.dg/pr103248.c: Likewise.

    (cherry picked from commit 2f0c8f74daef93c0c7b33294213e7db6df58c4d1)

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

end of thread, other threads:[~2022-02-17 11:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 11:11 [Bug target/103248] New: ICE in operation_could_trap_helper_p, at tree-eh.c:2479 marxin at gcc dot gnu.org
2021-11-15 11:21 ` [Bug target/103248] " pinskia at gcc dot gnu.org
2021-11-15 11:24 ` marxin at gcc dot gnu.org
2021-11-15 12:12 ` rguenth at gcc dot gnu.org
2021-11-15 12:16 ` marxin at gcc dot gnu.org
2021-11-15 12:26 ` rguenth at gcc dot gnu.org
2021-11-15 12:33 ` marxin at gcc dot gnu.org
2021-11-15 12:54 ` jakub at gcc dot gnu.org
2021-11-16  9:26 ` rguenth at gcc dot gnu.org
2021-11-16  9:30 ` marxin at gcc dot gnu.org
2021-11-16  9:30 ` marxin at gcc dot gnu.org
2021-11-16 10:44 ` [Bug middle-end/103248] " rguenth at gcc dot gnu.org
2021-11-16 12:49 ` [Bug middle-end/103248] [12 Regression] " rguenth at gcc dot gnu.org
2021-11-17  0:32 ` joseph at codesourcery dot com
2021-11-19  8:36 ` cvs-commit at gcc dot gnu.org
2021-11-19  8:36 ` rguenth at gcc dot gnu.org
2021-11-22  8:00 ` cvs-commit at gcc dot gnu.org
2022-02-17 10:48 ` cvs-commit at gcc dot gnu.org
2022-02-17 11:57 ` cvs-commit 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).