public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/63541] New: gcc compilation error: The register specified for 'variable' is not general enough to be used as a register variable
@ 2014-10-15  5:57 vinitha_kv at rediffmail dot com
  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
  0 siblings, 2 replies; 3+ messages in thread
From: vinitha_kv at rediffmail dot com @ 2014-10-15  5:57 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-15  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-15  5:57 [Bug inline-asm/63541] New: gcc compilation error: The register specified for 'variable' is not general enough to be used as a register variable vinitha_kv at rediffmail dot com
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

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).