public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97004] [nvptx] __int128 initializer incorrect Date: Thu, 10 Sep 2020 19:30:58 +0000 [thread overview] Message-ID: <bug-97004-4-Elb4d4wV98@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97004-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97004 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom de Vries <vries@gcc.gnu.org>: https://gcc.gnu.org/g:af47a2035a4882e6d4506e3d00b5a42414e3ee2b commit r11-3127-gaf47a2035a4882e6d4506e3d00b5a42414e3ee2b Author: Tom de Vries <tdevries@suse.de> Date: Thu Sep 10 15:54:14 2020 +0200 [nvptx] Fix printing of 128-bit constant Currently, for this code from c-c++-common/spec-barrier-1.c: ... __int128 g = 9; ... we generate: ... // BEGIN GLOBAL VAR DEF: g .visible .global .align 8 .u64 g[2] = { 9, 9 }; ... and consequently the test-case fails in execution. The problem is caused by a shift in nvptx_assemble_value: ... val >>= part * BITS_PER_UNIT; ... where the shift amount is equal to the number of bits in val, which is undefined behaviour. Fix this by detecting the situation and setting val to 0. Tested on nvptx. gcc/ChangeLog: PR target/97004 * config/nvptx/nvptx.c (nvptx_assemble_value): Handle shift by number of bits in shift operand.
next prev parent reply other threads:[~2020-09-10 19:30 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-09 22:39 [Bug target/97004] New: " vries at gcc dot gnu.org 2020-09-10 13:24 ` [Bug target/97004] " vries at gcc dot gnu.org 2020-09-10 13:34 ` jakub at gcc dot gnu.org 2020-09-10 19:30 ` cvs-commit at gcc dot gnu.org [this message] 2020-09-10 19:33 ` vries 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-97004-4-Elb4d4wV98@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).