public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/96810] This is a case that gcc shoud not compile successfully, but gcc acts opposite. Date: Thu, 27 Aug 2020 08:49:28 +0000 [thread overview] Message-ID: <bug-96810-4-KA9AA7lvet@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96810-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96810 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The standard says this is unspecified behavior, but the unspecified behavior happens at runtime, so if the compiler could detect it at compile time, it would need to be at most a warning (if the code is never called, there is no unspecified behavior). Generally this isn't something that can be detected at compile time, e.g. the target data can be in a different function from target, or there could be target exit data that unmaps it in between and makes it valid, or the fact that the pointer must alias the array could be not known to the compiler, etc. And the testcase is rejected at runtime: libgomp: Trying to map into device [0x7ffc13463cbc..0x7ffc13463d0c) object when [0x7ffc13463cb0..0x7ffc13463cc0) is already mapped
next prev parent reply other threads:[~2020-08-27 8:49 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-27 8:11 [Bug c/96810] New: " weiwt.fnst at cn dot fujitsu.com 2020-08-27 8:49 ` jakub at gcc dot gnu.org [this message] 2020-08-28 5:12 ` [Bug c/96810] " weiwt.fnst at cn dot fujitsu.com 2020-08-28 14:39 ` jakub at gcc dot gnu.org 2020-08-31 8:28 ` weiwt.fnst at cn dot fujitsu.com 2020-09-03 5:14 ` weiwt.fnst at cn dot fujitsu.com
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-96810-4-KA9AA7lvet@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).