public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110219] New: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int
@ 2023-06-12 10:09 zsojka at seznam dot cz
  2023-06-12 11:19 ` [Bug tree-optimization/110219] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2023-06-12 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110219
           Summary: [14 Regression] ICE: tree check: expected integer_cst,
                    have real_cst in to_wide, at tree.h:6314 with _Complex
                    float to int
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Os -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre
testcase.c 
during GIMPLE pass: evrp
testcase.c: In function 'foo':
testcase.c:8:1: internal compiler error: tree check: expected integer_cst, have
real_cst in to_wide, at tree.h:6314
    8 | }
      | ^
0x851b7a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        /repo/gcc-trunk/gcc/tree.cc:8899
0xd15336 tree_check(tree_node const*, char const*, int, char const*, tree_code)
        /repo/gcc-trunk/gcc/tree.h:3826
0xd15336 wi::to_wide(tree_node const*)
        /repo/gcc-trunk/gcc/tree.h:6314
0xd159c2 wi::to_wide(tree_node const*)
        /repo/gcc-trunk/gcc/tree.h:3570
0xd159c2 adjust_realpart_expr
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:538
0xd159c2 gimple_range_adjustment
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:563
0xd159c2 fold_using_range::range_of_range_op(vrange&, gimple_range_op_handler&,
fur_source&)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:741
0x23c54b6 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:594
0x23c597c fold_range(vrange&, gimple*, range_query*)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:318
0x23be761 ranger_cache::get_global_range(vrange&, tree_node*, bool&)
        /repo/gcc-trunk/gcc/gimple-range-cache.cc:1010
0x23b5bcc gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*)
        /repo/gcc-trunk/gcc/gimple-range.cc:311
0x1737079 range_query::value_of_stmt(gimple*, tree_node*)
        /repo/gcc-trunk/gcc/value-query.cc:134
0x15febbf substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        /repo/gcc-trunk/gcc/tree-ssa-propagate.cc:792
0x238035e dom_walker::walk(basic_block_def*)
        /repo/gcc-trunk/gcc/domwalk.cc:311
0x15fdd05 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        /repo/gcc-trunk/gcc/tree-ssa-propagate.cc:971
0x1702139 execute_ranger_vrp(function*, bool, bool)
        /repo/gcc-trunk/gcc/tree-vrp.cc:998
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-1694-20230611112131-g20643513b8d-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-1694-20230611112131-g20643513b8d-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230611 (experimental) (GCC)

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

* [Bug tree-optimization/110219] [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int
  2023-06-12 10:09 [Bug tree-optimization/110219] New: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int zsojka at seznam dot cz
@ 2023-06-12 11:19 ` rguenth at gcc dot gnu.org
  2023-06-12 18:12 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-12 11:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

* [Bug tree-optimization/110219] [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int
  2023-06-12 10:09 [Bug tree-optimization/110219] New: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int zsojka at seznam dot cz
  2023-06-12 11:19 ` [Bug tree-optimization/110219] " rguenth at gcc dot gnu.org
@ 2023-06-12 18:12 ` pinskia at gcc dot gnu.org
  2023-06-16 10:17 ` zsojka at seznam dot cz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-12 18:12 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-06-12
     Ever confirmed|0                           |1

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

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

* [Bug tree-optimization/110219] [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int
  2023-06-12 10:09 [Bug tree-optimization/110219] New: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int zsojka at seznam dot cz
  2023-06-12 11:19 ` [Bug tree-optimization/110219] " rguenth at gcc dot gnu.org
  2023-06-12 18:12 ` pinskia at gcc dot gnu.org
@ 2023-06-16 10:17 ` zsojka at seznam dot cz
  2023-06-16 23:32 ` pinskia at gcc dot gnu.org
  2023-06-16 23:33 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2023-06-16 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Zdenek Sojka <zsojka at seznam dot cz> ---
This seems to have been fixed between r14-1822 (BAD) and r14-1881 (GOOD).

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

* [Bug tree-optimization/110219] [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int
  2023-06-12 10:09 [Bug tree-optimization/110219] New: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2023-06-16 10:17 ` zsojka at seznam dot cz
@ 2023-06-16 23:32 ` pinskia at gcc dot gnu.org
  2023-06-16 23:33 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-16 23:32 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 110266.

*** This bug has been marked as a duplicate of bug 110266 ***

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

* [Bug tree-optimization/110219] [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int
  2023-06-12 10:09 [Bug tree-optimization/110219] New: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2023-06-16 23:32 ` pinskia at gcc dot gnu.org
@ 2023-06-16 23:33 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-16 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> Dup of bug 110266.
> 
> *** This bug has been marked as a duplicate of bug 110266 ***

I should say that bug has a better testcase than one which you need to disable
optimizations which is why I closed this one as a dup of that one even though
this one was filed before and that one already recorded the fix for it too.

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

end of thread, other threads:[~2023-06-16 23:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 10:09 [Bug tree-optimization/110219] New: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int zsojka at seznam dot cz
2023-06-12 11:19 ` [Bug tree-optimization/110219] " rguenth at gcc dot gnu.org
2023-06-12 18:12 ` pinskia at gcc dot gnu.org
2023-06-16 10:17 ` zsojka at seznam dot cz
2023-06-16 23:32 ` pinskia at gcc dot gnu.org
2023-06-16 23:33 ` pinskia 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).