When compiling the following code with optimization turned on, I get an ICE in merge_assigned_reloads, at reload1.c:6134: void a() { struct { long b; } *c, *d, *e; c = e; h(); int f; asm volatile("" :"=S" (f), "=D" (f) :); asm("" : "=m" (c->b), "=b" (c) : "m" (d->b), "a" (c), "d" (d), "b" (c)); } I am not absolutely sure, whether this code is legal, but I can't see why it should not. Release: 3.3 20030413 (prerelease), 3.4 20030413 (experimental) Environment: System: Linux schiele 2.4.20-4GB-athlon #1 Mon Mar 17 17:56:47 UTC 2003 i686 unknown unknown GNU/Linux Architecture: i686 host: i486-suse-linux-gnu build: i486-suse-linux-gnu target: i486-suse-linux-gnu configured with: /local/src/gcc/configure --enable-threads=posix --prefix=/local/inst/gcc34 --enable-languages=c,c++,f77,objc --disable-checking --disable-libgcj --with-gxx-include-dir=/local/inst/gcc34/include/g++ --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux How-To-Repeat: gcc -O -c ice.i
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed. A regression w.r.t 3.2
State-Changed-From-To: analyzed->suspended State-Changed-Why: The code is illegal. The same variable can't be the target of two outputs.
State-Changed-From-To: suspended->analyzed State-Changed-Why: analyzed->analyzed
From: Robert Schiele <rschiele@uni-mannheim.de> To: rth@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, shensche@kodeaffe.de, gcc-gnats@gcc.gnu.org Cc: Subject: Re: inline-asm/10402: [3.3/3.4 regression] [i486] ICE in merge_assigned_reloads, at reload1.c:6134 Date: Fri, 18 Apr 2003 08:05:13 +0200 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 18, 2003 at 03:45:12AM -0000, rth@gcc.gnu.org wrote: > The code is illegal. The same variable can't be the target > of two outputs. =20 You mean because of the variable 'f'? Doesn't make a difference whether the second output is a different one. Cha= nge this line and the one above to: int f, g; asm volatile("" :"=3DS" (f), "=3DD" (g) :); The same thing happens. So we have an ice-on-legal-and-illegal-code. ;-) Robert --=20 Robert Schiele Tel.: +49-621-181-2517 Dipl.-Wirtsch.informatiker mailto:rschiele@uni-mannheim.de --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE+n5WZxcDFxyGNGNcRAh56AKCuHP0Q41K4DnnqgIXqWlq55gM5KgCfdYtx 8U9tRw8gfH19eLKYKV2Mk2c= =cFE3 -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--
still happens on the mainline (20030607).
I don't see it with mainline or 3.3 on 2003-06-12.
You are right, it does no longer happen. Seems someone has fixed it by accident. ;-)