public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/109886] New: UBSAN error: shift exponent 64 is too large for 64-bit type when compiling gcc.c-torture/compile/pr96796.c
@ 2023-05-17  8:55 jamborm at gcc dot gnu.org
  2023-05-17 19:07 ` [Bug ipa/109886] " pinskia at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: jamborm at gcc dot gnu.org @ 2023-05-17  8:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109886
           Summary: UBSAN error: shift exponent 64 is too large for 64-bit
                    type when compiling gcc.c-torture/compile/pr96796.c
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
                CC: aldyh at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: x86_64-linux-gnu

Bootstrap with undefined behavior sanitizer and subsequent run of
the testsuite (on revision ac3a5bbc629, so check for PR 109788 is
included) reports a new error when compiling C torture testcase
gcc/testsuite/gcc.c-torture/compile/pr96796.c:

$ UBSAN_OPTIONS="halt_on_error=1 print_stacktrace=1"
/home/mjambor/gcc/mine/b-obj/gcc/xgcc -B/home/mjambor/gcc/mine/b-obj/gcc/
-fdiagnostics-plain-output -O1 -w -fcommon -c -o pr96796.o
/home/mjambor/gcc/mine/src/gcc/testsuite/gcc.c-torture/compile/pr96796.c

/home/mjambor/gcc/mine/src/gcc/hwint.h:293:61: runtime error: shift exponent 64
is too large for 64-bit type 'long unsigned int'

    #0 0xbf8117 in sext_hwi(long, unsigned int)
/home/mjambor/gcc/mine/src/gcc/hwint.h:293
    #1 0xbf8117 in wi::hwi_with_prec::hwi_with_prec(long, unsigned int, signop)
/home/mjambor/gcc/mine/src/gcc/wide-int.h:1622
    #2 0xbf8117 in wi::shwi(long, unsigned int)
/home/mjambor/gcc/mine/src/gcc/wide-int.h:1631
    #3 0xbf8117 in wi::minus_one(unsigned int)
/home/mjambor/gcc/mine/src/gcc/wide-int.h:1645
    #4 0xbf8117 in irange::set_varying(tree_node*)
/home/mjambor/gcc/mine/src/gcc/value-range.h:871
    #5 0x2257e45 in range_cast(vrange&, tree_node*)
/home/mjambor/gcc/mine/src/gcc/range-op.cc:4860
    #6 0x1b119a6 in ipa_compute_jump_functions_for_edge
/home/mjambor/gcc/mine/src/gcc/ipa-prop.cc:2325
    #7 0x1b14f66 in ipa_compute_jump_functions_for_bb
/home/mjambor/gcc/mine/src/gcc/ipa-prop.cc:2449
    #8 0x1b14f66 in analysis_dom_walker::before_dom_children(basic_block_def*)
/home/mjambor/gcc/mine/src/gcc/ipa-prop.cc:3035
    #9 0x65a5ff3 in dom_walker::walk(basic_block_def*)
/home/mjambor/gcc/mine/src/gcc/domwalk.cc:311
    #10 0x1b0e601 in ipa_analyze_node(cgraph_node*)
/home/mjambor/gcc/mine/src/gcc/ipa-prop.cc:3103
    #11 0x1991487 in inline_indirect_intraprocedural_analysis
/home/mjambor/gcc/mine/src/gcc/ipa-fnsummary.cc:4315
    #12 0x1991487 in inline_analyze_function(cgraph_node*)
/home/mjambor/gcc/mine/src/gcc/ipa-fnsummary.cc:4334
    #13 0x1991afc in ipa_fn_summary_generate
/home/mjambor/gcc/mine/src/gcc/ipa-fnsummary.cc:4378
    #14 0x21351c1 in execute_ipa_summary_passes(ipa_opt_pass_d*)
/home/mjambor/gcc/mine/src/gcc/passes.cc:2304
    #15 0x10a2163 in ipa_passes
/home/mjambor/gcc/mine/src/gcc/cgraphunit.cc:2235
    [...]

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

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17  8:55 [Bug ipa/109886] New: UBSAN error: shift exponent 64 is too large for 64-bit type when compiling gcc.c-torture/compile/pr96796.c jamborm at gcc dot gnu.org
2023-05-17 19:07 ` [Bug ipa/109886] " pinskia at gcc dot gnu.org
2023-05-22 18:04 ` aldyh at gcc dot gnu.org
2023-05-22 18:07 ` pinskia at gcc dot gnu.org
2023-05-22 18:13 ` aldyh at gcc dot gnu.org
2023-05-23 16:14 ` jamborm at gcc dot gnu.org
2023-06-07 20:57 ` amacleod at redhat dot com
2023-06-08 12:27 ` jamborm at gcc dot gnu.org
2023-06-08 19:00 ` amacleod at redhat dot com
2023-06-09  9:00 ` jamborm at gcc dot gnu.org
2023-06-09 13:14 ` amacleod at redhat dot com
2023-06-09 13:58 ` amacleod at redhat dot com
2023-06-09 16:37 ` cvs-commit at gcc dot gnu.org
2023-06-10  1:44 ` amacleod at redhat dot com
2023-06-13  9:16 ` jamborm 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).