public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vinitha_kv at rediffmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/63541] New: gcc compilation error: The register specified for 'variable' is not general enough to be used as a register variable Date: Wed, 15 Oct 2014 05:57:00 -0000 [thread overview] Message-ID: <bug-63541-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63541 Bug ID: 63541 Summary: gcc compilation error: The register specified for 'variable' is not general enough to be used as a register variable Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: vinitha_kv at rediffmail dot com For the following code gcc throws error and do not compile (for arm-*-gnueabi*) Test code: $ cat test.c void foo() { register unsigned int curr_pc asm ("pc"); unsigned int arm_pc; arm_pc = curr_pc; } Observed the issue with gcc-4.8.0 onwards.(Works fine with 4.7.2) Checked with latest with gcc 5.0 (GNU C (GCC) version 5.0.0 20141014 ) also, getting the following error. ... xgcc -v Using built-in specs. COLLECT_GCC=~/gcc-git/official-gcc/objdir/gcc/xgcc Target: arm-none-linux-gnueabi Configured with: ../configure --host=x86_64-pc-linux-gnu --target=arm-none-linux-gnueabi --build=x86_64-pc-linux-gnu --prefix=/usr/local/arm-none-linux-gnueabi/cross --disable-nls --enable-__cxa_atexit --enable-languages=c,c++ --disable-multilib --enable-threads=posix --enable-shared --enable-symvers=gnu Thread model: posix gcc version 5.0.0 20141014 (experimental) (GCC) ... test.c: In function 'foo': test.c:3:24: error: the register specified for 'curr_pc' is not general enough to be used as a register variable register unsigned int curr_pc asm ("pc"); ... Digged a little and the error seems to occur after commit, [https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=bffbb863ff0f267b5111bfa95b42c99cd0474424] in 4.8.0. Regards, Vinitha Vijayan
next reply other threads:[~2014-10-15 5:57 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-15 5:57 vinitha_kv at rediffmail dot com [this message] 2014-10-15 6:00 ` [Bug inline-asm/63541] " pinskia at gcc dot gnu.org 2014-10-15 8:14 ` 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-63541-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).