Bug 20382 - internal compiler error with bogus asm output constraint
Summary: internal compiler error with bogus asm output constraint
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: inline-asm (show other bugs)
Version: 3.4.1
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2005-03-08 13:10 UTC by David Eicher
Modified: 2005-06-08 13:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 2.95.3 2.95.4 3.0.4 3.2.3 3.3.5 3.4.3 4.0.0
Last reconfirmed:


Attachments
preprocessed input file (9.23 KB, image/jpeg)
2005-03-08 13:13 UTC, David Eicher
Details
command line that triggered bug. (428 bytes, text/plain)
2005-03-08 13:14 UTC, David Eicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Eicher 2005-03-08 13:10:27 UTC
systemConfig/5xx_board_init.c:104 internal compiler error: in emit_move_insn, 
at expr.c:2809

gcc version 3.4.0-macraigor1

GNU C version 3.4.0-macraigor1 (powerpc-elf)
compiled by GNU C version 3.3.1 (cygming special).
I didn't configure GNU, Macraigor did, I didn't even know one could configure 
it, I haven't seen documentation on this.

command line is in file bug.rpt

I don't see how to attach the files you have asked for:

I'm running GNU on a Dell 8400 with WindowsXP and cygwin.
Comment 1 David Eicher 2005-03-08 13:13:39 UTC
Created attachment 8360 [details]
preprocessed input file
Comment 2 David Eicher 2005-03-08 13:14:57 UTC
Created attachment 8361 [details]
command line that triggered bug.
Comment 3 Falk Hueffner 2005-03-08 14:25:02 UTC
Confirmed. This is triggered by a bogus argument for an output constraint.
Not a regression.

void f() {
  __asm__ (""  : "=r" ("r5"), "+r" ("r5"));
}

Comment 4 David Eicher 2005-03-09 02:48:53 UTC
Subject: RE:  internal compiler error with bogus asm output constraint

Where can I find some documentation on using this extended asm format? I
have read all the GNU docs on it and can not understand how to use it.

Thanks,

Dave


-----Original Message-----
From: falk at debian dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: Tuesday, March 08, 2005 6:25 AM
To: sailors3@comcast.net
Subject: [Bug inline-asm/20382] internal compiler error with bogus asm
output constraint


------- Additional Comments From falk at debian dot org  2005-03-08 14:25
-------
Confirmed. This is triggered by a bogus argument for an output constraint.
Not a regression.

void f() {
  __asm__ (""  : "=r" ("r5"), "+r" ("r5"));
}



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|middle-end                  |inline-asm
     Ever Confirmed|                            |1
  GCC build triplet|3.3.1-macraigor1            |
   GCC host triplet|3.4.0                       |
 GCC target triplet|3.3.1                       |
           Keywords|                            |ice-on-invalid-code
      Known to fail|                            |2.95.4 3.2.3 3.3.5 3.4.3
                   |                            |4.1.0
            Summary|internal compiler error in  |internal compiler error
with
                   |emit_move_insn, at          |bogus asm output constraint
                   |expr.c:2809                 |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20382

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

Comment 5 Falk Hueffner 2005-03-09 09:14:57 UTC
(In reply to comment #4)

> Where can I find some documentation on using this extended asm format? I
> have read all the GNU docs on it and can not understand how to use it.

Well, those docs are all we have. If you have any more concrete criticism,
feel free to file a bug about it.
Comment 6 David Eicher 2005-03-09 12:00:40 UTC
Subject: RE:  internal compiler error with bogus asm output constraint

Hello,

I apologize if my question sounded like criticism, It is really more of a
reflection on me (my ability to learn) than on GHU. 

I'm trying to get the compiler to accept this asm instruction:

/*		asm("ori		r5, r5, (ARCH_MSR_ME |
ARCH_MSR_RI)");*/

Using extended asm as this:

		__asm__ ("ori	%0,%1,%2"
				: "=r" ("r5")
				: "0" ("r5"), "g" (ARCH_MSR_ME |
ARCH_MSR_RI));

And the compiler is giving me:

Error: assignment of read-only location
Error: incompatible types of assignment

I guess I'm not properly interpreting the documentation on how to use
registers in the asm, is that correct?

Thanks,

Dave


-----Original Message-----
From: falk at debian dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: Wednesday, March 09, 2005 1:15 AM
To: sailors3@comcast.net
Subject: [Bug inline-asm/20382] internal compiler error with bogus asm
output constraint


------- Additional Comments From falk at debian dot org  2005-03-09 09:14
-------
(In reply to comment #4)

> Where can I find some documentation on using this extended asm format? I
> have read all the GNU docs on it and can not understand how to use it.

Well, those docs are all we have. If you have any more concrete criticism,
feel free to file a bug about it.


Comment 7 Falk Hueffner 2005-03-09 12:30:56 UTC
(In reply to comment #6)

> I guess I'm not properly interpreting the documentation on how to use
> registers in the asm, is that correct?

Yes, that's correct :-) I suggest you ask at gcc-help@gcc.gnu.org, preferably
stating what it *really* is that you want (why do you want to generate this
asm?).
Comment 8 David Eicher 2005-03-10 02:42:36 UTC
Subject: RE:  internal compiler error with bogus asm output constraint

Thanks, I'll give that a try.

Regards,

Dave


-----Original Message-----
From: falk at debian dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: Wednesday, March 09, 2005 4:31 AM
To: sailors3@comcast.net
Subject: [Bug inline-asm/20382] internal compiler error with bogus asm
output constraint


------- Additional Comments From falk at debian dot org  2005-03-09 12:30
-------
(In reply to comment #6)

> I guess I'm not properly interpreting the documentation on how to use
> registers in the asm, is that correct?

Yes, that's correct :-) I suggest you ask at gcc-help@gcc.gnu.org,
preferably
stating what it *really* is that you want (why do you want to generate this
asm?).


Comment 9 Andrew Pinski 2005-06-08 13:14:36 UTC
Fixed in 4.1.0 by:
2005-05-08  Roger Sayle  <roger@eyesopen.com>
        
        PR inline-asm/8788
        * stmt.c (expand_asm_operands): Avoid calling force_reg on BLKmode
        operands.