Bug 9379 - error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
Summary: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: inline-asm (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-20 21:56 UTC by k_fukui
Modified: 2003-07-25 17:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
error_result-source.tar.gz (3.65 KB, application/x-gzip )
2003-05-21 15:17 UTC, k_fukui
Details

Note You need to log in before you can comment on or make changes to this bug.
Description k_fukui 2003-01-20 21:56:00 UTC
I tried to compile linux-2.4.20 with gcc-3.3pre(cvs) on powerpc linux.
The same kernel source is no problem with gcc-3.2.2pre.
So this is regression.

__sc_4 and __sc_5 which are in _syscall3.
I attached build log and source with no snip.

Thanks,
Kaoru
--- error --

/usr/src/redhat/BUILD/linux/include/asm/unistd.h:439: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/usr/src/redhat/BUILD/linux/include/asm/unistd.h:439: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/usr/src/redhat/BUILD/linux/include/asm/unistd.h:438: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/usr/src/redhat/BUILD/linux/include/asm/unistd.h:438: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list

------unistd.h---------

<snip>
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3)		\
type name(type1 arg1, type2 arg2, type3 arg3)				\
{									\
	unsigned long __sc_ret, __sc_err;				\
	{								\
		register unsigned long __sc_0 __asm__ ("r0");		\
		register unsigned long __sc_3 __asm__ ("r3");		\
		register unsigned long __sc_4 __asm__ ("r4");		\
		register unsigned long __sc_5 __asm__ ("r5");		\
									\
		__sc_3 = (unsigned long) (arg1);			\
		__sc_4 = (unsigned long) (arg2);			\
		__sc_5 = (unsigned long) (arg3);			\
		__sc_0 = __NR_##name;					\
		__asm__ __volatile__					\
			("sc           \n\t"				\
			 "mfcr %1      "				\
			: "=&r" (__sc_3), "=&r" (__sc_0)		\
			: "0"   (__sc_3), "1"   (__sc_0),		\
			  "r"   (__sc_4),				\
			  "r"   (__sc_5)				\
			: __syscall_clobbers);				\
		__sc_ret = __sc_3;					\
		__sc_err = __sc_0;					\
	}								\
	__syscall_return (type);					\
}


<snip>

static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) <<--line 438
static inline _syscall3(int,open,const char *,file,int,flag,int,mode)           <<--line 439

Release:
gcc version 3.3 20030118 (prerelease)

Environment:
# gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.3/specs
Configured with: ../configure --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --disable-checking --enable-threads=posix --enable-__cxa_atexit --enable-altivec=no --prefix=/usr --with-system-zlib --host=powerpc-unknown-linux-gnu --enable-languages=c,c++,objc,f77
Thread model: posix
gcc version 3.3 20030118 (prerelease)
 ld -v
GNU ld version 2.13.90 20030116

How-To-Repeat:
Build linux-2.4.20 with gcc-3.3 (prerelease) on linux powerpc32
Comment 1 Franz Sirl 2003-01-20 22:16:00 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Kernel bug. I thought I submitted a patch to Ben to fix it, I'll recheck.
Comment 2 k_fukui 2003-01-21 07:37:36 UTC
From: Kaoru Fukui <k_fukui@highway.ne.jp>
To: sirl@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
        k_fukui@highway.ne.jp, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: inline-asm/9379: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
Date: Tue, 21 Jan 2003 07:37:36 +0900 (JST)

 On 20 Jan, sirl@gcc.gnu.org wrote:
 > Synopsis: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: sirl
 > State-Changed-When: Mon Jan 20 22:16:00 2003
 > State-Changed-Why:
 >     Kernel bug. I thought I submitted a patch to Ben to fix it, I'll recheck.
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9379
 
 OK,
 Thanks Your speedy reply.
  I will try again after that fix.
 
 a lot of thank you.
 Kaoru