public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "daney at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/38789] [4.4 Regression] __builtin_constant_p appears to eveluate to true for non-constant arguments. Date: Fri, 09 Jan 2009 22:00:00 -0000 [thread overview] Message-ID: <20090109220004.8989.qmail@sourceware.org> (raw) In-Reply-To: <bug-38789-7151@http.gcc.gnu.org/bugzilla/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 643 bytes --] ------- Comment #5 from daney at gcc dot gnu dot org 2009-01-09 22:00 ------- You have to be able to do one of the original test case or this: $ cat foo1.c void baz(int v) { unsigned a; a = (v == 1) ? 1 : 2; if (__builtin_constant_p(a)) { asm volatile ("you lose. %0" : : "i" (a)); } else { asm volatile ("you win. %0" : : "i" (a)); } } $ gcc -O2 -S foo1.c foo1.c: In function baz: foo1.c:9: warning: asm operand 0 probably doesnt match constraints foo1.c:9: error: impossible constraint in asm -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38789
next prev parent reply other threads:[~2009-01-09 22:00 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-01-09 21:40 [Bug tree-optimization/38789] New: " daney at gcc dot gnu dot org 2009-01-09 21:45 ` [Bug tree-optimization/38789] " pinskia at gcc dot gnu dot org 2009-01-09 21:51 ` [Bug tree-optimization/38789] [4.4 Regression] " rguenth at gcc dot gnu dot org 2009-01-09 21:55 ` daney at gcc dot gnu dot org 2009-01-09 21:57 ` pinskia at gcc dot gnu dot org 2009-01-09 22:00 ` daney at gcc dot gnu dot org [this message] 2009-01-09 22:57 ` rguenth at gcc dot gnu dot org 2009-01-09 23:50 ` rguenth at gcc dot gnu dot org 2009-01-15 15:56 ` [Bug tree-optimization/38789] [4.4 Regression] __builtin_constant_p appears to evaluate " rguenth at gcc dot gnu dot org 2009-01-16 12:43 ` jakub at gcc dot gnu dot org 2009-01-16 12:49 ` jakub at gcc dot gnu dot org 2009-01-16 15:01 ` jakub at gcc dot gnu dot org 2009-01-16 15:03 ` jakub at gcc dot gnu dot org 2009-01-26 10:22 ` rguenth at gcc dot gnu dot org 2009-01-30 17:47 ` hjl at gcc dot gnu dot 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=20090109220004.8989.qmail@sourceware.org \ --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).