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

            Bug ID: 129034
           Summary: [17 Regression] ICE: in fold_relational_const, at
                    fold-const.cc:15881 with -O
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c 
testcase.c: In function 'bar':
testcase.c:6:1: note: the ABI for passing parameters with 64-byte alignment has
changed in GCC 4.6
    6 | bar(V v)
      | ^~~
during GIMPLE pass: einline
testcase.c: In function 'foo':
testcase.c:18:1: internal compiler error: in fold_relational_const, at
fold-const.cc:15881
   18 | }
      | ^
0x2edf789 internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xd15e57 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x891345 fold_relational_const
        /repo/gcc-trunk/gcc/fold-const.cc:15881
0x10af102 fold_binary_loc(unsigned long, tree_code, tree_node*, tree_node*,
tree_node*)
        /repo/gcc-trunk/gcc/fold-const.cc:11003
0x10ce065 fold_binary_to_constant(tree_code, tree_node*, tree_node*,
tree_node*)
        /repo/gcc-trunk/gcc/fold-const.cc:15594
0x1242675 evaluate_conditions_for_known_args
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:829
0x125da1e do_estimate_edge_size(cgraph_edge*)
        /repo/gcc-trunk/gcc/ipa-inline-analysis.cc:337
0x1261222 estimate_edge_size(cgraph_edge*)
        /repo/gcc-trunk/gcc/ipa-inline.h:79
0x1261222 estimate_edge_growth(cgraph_edge*)
        /repo/gcc-trunk/gcc/ipa-inline.h:100
0x125f3c5 estimate_size_after_inlining(cgraph_node*, cgraph_edge*)
        /repo/gcc-trunk/gcc/ipa-inline-analysis.cc:390
0x2c50301 caller_growth_limits
        /repo/gcc-trunk/gcc/ipa-inline.cc:235
0x2c50301 can_inline_edge_by_limits_p
        /repo/gcc-trunk/gcc/ipa-inline.cc:557
0x2c518c5 can_early_inline_edge_p
        /repo/gcc-trunk/gcc/ipa-inline.cc:724
0x2c58c44 early_inline_small_functions
        /repo/gcc-trunk/gcc/ipa-inline.cc:3099
0x2c58c44 early_inliner(function*)
        /repo/gcc-trunk/gcc/ipa-inline.cc:3297
/repo/gcc-trunk/binary-trunk-20261125175604-g2e6a851c691-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20261125175604-g2e6a851c691-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -O -o /tmp/cctQktEP.s
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.

Reply via email to