public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zeccav at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/99376] New: Sanitizer detects undefined behaviour in rtlanal.c compiling ada Date: Thu, 04 Mar 2021 05:49:44 +0000 [thread overview] Message-ID: <bug-99376-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99376 Bug ID: 99376 Summary: Sanitizer detects undefined behaviour in rtlanal.c compiling ada Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- Needs option -O2 -- /home/vitti/gcc-150221-full-undefined/gcc/xgcc -S -B/home/vitti/gcc-150221-full-undefined/gcc/ -I/home/vitti/gcc-150221-full-undefined/gcc/testsuite/ada/acats/support ~/f95/ada1.adb -O2 -- ../../gcc-150221/gcc/rtlanal.c:5060:35: runtime error: shift exponent 126 is too large for 64-bit type 'long unsigned int' -- rtlanal.c:5060 "nonzero &= ~((HOST_WIDE_INT_1U << result_low) - 1);" WITH REPORT; USE REPORT; PROCEDURE ada1 IS F : LONG_INTEGER; FUNCTION IDENT_LONG(A : LONG_INTEGER) RETURN LONG_INTEGER IS BEGIN IF EQUAL (3, 3) THEN RETURN A; ELSE RETURN 0; END IF; END IDENT_LONG; FUNCTION LONG_OK (X : LONG_INTEGER) RETURN BOOLEAN IS BEGIN return true; END; BEGIN F := IDENT_LONG(LONG_INTEGER'FIRST); BEGIN IF LONG_OK (F*F) THEN return ; END IF; END; END ada1;
next reply other threads:[~2021-03-04 5:49 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-04 5:49 zeccav at gmail dot com [this message] 2021-03-04 7:52 ` [Bug rtl-optimization/99376] " marxin at gcc dot gnu.org 2021-03-04 9:50 ` [Bug rtl-optimization/99376] Sanitizer detects undefined behaviour in rtlanal.c ebotcazou at gcc dot gnu.org 2021-03-04 9:57 ` ebotcazou at gcc dot gnu.org 2021-03-04 10:04 ` [Bug rtl-optimization/99376] sanitizer " ebotcazou at gcc dot gnu.org 2021-03-05 11:47 ` cvs-commit at gcc dot gnu.org 2021-03-05 11:56 ` ebotcazou 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-99376-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: linkBe 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).