This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/56148] [4.8 Regression] inline asm matching constraint with different mode
- From: "fm3 at os dot inf.tu-dresden.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Feb 2013 14:39:44 +0000
- Subject: [Bug inline-asm/56148] [4.8 Regression] inline asm matching constraint with different mode
- Auto-submitted: auto-generated
- References: <bug-56148-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56148
Frank Mehnert <fm3 at os dot inf.tu-dresden.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fm3 at os dot
| |inf.tu-dresden.de
--- Comment #14 from Frank Mehnert <fm3 at os dot inf.tu-dresden.de> 2013-02-22 14:39:44 UTC ---
(In reply to comment #0)
> void
> foo (void)
> {
> unsigned char e[16];
> unsigned long a, b, c, d;
> __asm__ __volatile__ ("" : "=d" (a), "=&c" (c), "=&D" (d), "=&a" (b)
> : "0" (-1U), "mr" (e), "1" (128 >> 5), "2" (e), "3" (-1U));
> }
>
> is rejected since LRA merge on x86_64-linux at -O2:
> rh905862.i: In function âfooâ:
> rh905862.i:6:3: error: âasmâ operand has impossible constraints
> __asm__ __volatile__ ("" : "=d" (a), "=&c" (c), "=&D" (d), "=&a" (b)
> ^
>
> The testcase is questionable, because a, c and b are DImode, while -1U, 128 >>
> 5
> and -1U are all SImode using 0/1/3 constraints matching those DImodes.
> But we accept it with reload or with -O0 even with LRA.
Glad that gcc-4.8 does now behave as before but I would also like to understand
what is questionable about this testcase. How to improve it?