public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/109788] New: [14 Regression] gcc/hwint.h:293:61: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int
Date: Tue, 09 May 2023 12:17:20 +0000	[thread overview]
Message-ID: <bug-109788-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 109788
           Summary: [14 Regression] gcc/hwint.h:293:61: runtime error:
                    shift exponent 64 is too large for 64-bit type 'long
                    unsigned int
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

The following UBSAN happens with the following test-case:

$ cat cat associate_60.f90
cat: cat: No such file or directory
    character(3) :: a = 'abc'
    associate (y => spread(trim(a),1,2) // 'd')
    end associate
  end

$ /dev/shm/objdir/gcc/xgcc -B/dev/shm/objdir/gcc/ associate_60.f90 -c -Os
/home/marxin/Programming/gcc/gcc/hwint.h:293:61: runtime error: shift exponent
64 is too large for 64-bit type 'long unsigned int'
    #0 0xb9c00c in sext_hwi(long, unsigned int)
(/dev/shm/objdir/gcc/f951+0xb9c00c) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #1 0xb9c737 in wi::hwi_with_prec::hwi_with_prec(long, unsigned int, signop)
(/dev/shm/objdir/gcc/f951+0xb9c737) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #2 0xb9c7c2 in wi::shwi(long, unsigned int)
(/dev/shm/objdir/gcc/f951+0xb9c7c2) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #3 0x128eaad in wi::minus_one(unsigned int)
(/dev/shm/objdir/gcc/f951+0x128eaad) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #4 0x12928b9 in irange::set_varying(tree_node*)
(/dev/shm/objdir/gcc/f951+0x12928b9) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #5 0x247afe1 in range_cast(vrange&, tree_node*)
(/dev/shm/objdir/gcc/f951+0x247afe1) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #6 0x1dd34ff in ipa_compute_jump_functions_for_edge(ipa_func_body_info*,
cgraph_edge*) (/dev/shm/objdir/gcc/f951+0x1dd34ff) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #7 0x1dd4b25 in ipa_compute_jump_functions_for_bb(ipa_func_body_info*,
basic_block_def*) (/dev/shm/objdir/gcc/f951+0x1dd4b25) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #8 0x1dd82c5 in analysis_dom_walker::before_dom_children(basic_block_def*)
(/dev/shm/objdir/gcc/f951+0x1dd82c5) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #9 0x60da965 in dom_walker::walk(basic_block_def*)
(/dev/shm/objdir/gcc/f951+0x60da965) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #10 0x1dd8c79 in ipa_analyze_node(cgraph_node*)
(/dev/shm/objdir/gcc/f951+0x1dd8c79) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #11 0x63788ee in ipcp_generate_summary()
(/dev/shm/objdir/gcc/f951+0x63788ee) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #12 0x23758b2 in execute_ipa_summary_passes(ipa_opt_pass_d*)
(/dev/shm/objdir/gcc/f951+0x23758b2) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #13 0x14834d3 in ipa_passes() (/dev/shm/objdir/gcc/f951+0x14834d3)
(BuildId: 3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #14 0x1483f12 in symbol_table::compile()
(/dev/shm/objdir/gcc/f951+0x1483f12) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #15 0x1484ee4 in symbol_table::finalize_compilation_unit()
(/dev/shm/objdir/gcc/f951+0x1484ee4) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #16 0x280638f in compile_file() (/dev/shm/objdir/gcc/f951+0x280638f)
(BuildId: 3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #17 0x280e46e in do_compile(bool) (/dev/shm/objdir/gcc/f951+0x280e46e)
(BuildId: 3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #18 0x280eccb in toplev::main(int, char**)
(/dev/shm/objdir/gcc/f951+0x280eccb) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #19 0x692ac5f in main (/dev/shm/objdir/gcc/f951+0x692ac5f) (BuildId:
3d3a45e367361bf0f2e66b9ab765947856982ca3)
    #20 0x7ffff722cbaf in __libc_start_call_main (/lib64/libc.so.6+0x27baf)
(BuildId: 9854a3cd243b5cfbf99999e26f7fbb65e62146c7)
    #21 0x7ffff722cc78 in __libc_start_main_alias_1 (/lib64/libc.so.6+0x27c78)
(BuildId: 9854a3cd243b5cfbf99999e26f7fbb65e62146c7)
    #22 0xa604a4 in _start ../sysdeps/x86_64/start.S:115

             reply	other threads:[~2023-05-09 12:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 12:17 marxin at gcc dot gnu.org [this message]
2023-05-09 12:31 ` [Bug tree-optimization/109788] [14 Regression] gcc/hwint.h:293:61: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int since r14-377-gc92b8be9b52b7e marxin at gcc dot gnu.org
2023-05-09 12:44 ` jakub at gcc dot gnu.org
2023-05-09 12:58 ` [Bug fortran/109788] " jakub at gcc dot gnu.org
2023-05-09 13:10 ` jakub at gcc dot gnu.org
2023-05-10  7:05 ` rguenth at gcc dot gnu.org
2023-05-10 11:21 ` cvs-commit at gcc dot gnu.org
2023-05-10 11:23 ` jakub at gcc dot gnu.org
2023-05-10 18:47 ` anlauf at gcc dot gnu.org
2023-05-10 18:53 ` jakub at gcc dot gnu.org
2023-05-10 18:55 ` jakub at gcc dot gnu.org
2023-05-10 21:40 ` anlauf at gcc dot gnu.org
2023-05-10 21:46 ` jakub at gcc dot gnu.org
2023-05-12 19:41 ` anlauf at gcc dot gnu.org
2023-05-17  8:44 ` jamborm at gcc dot gnu.org
2023-10-17 10:34 ` rguenth at gcc dot gnu.org
2024-05-07  7:40 ` [Bug fortran/109788] [14/15 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109788-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).