public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/36722]  New: ICE with inline asm in 64bit mode because of type size
@ 2008-07-03 18:54 adam at os dot inf dot tu-dresden dot de
  2008-08-11  1:28 ` [Bug target/36722] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: adam at os dot inf dot tu-dresden dot de @ 2008-07-03 18:54 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]

The following code:

void x(void);
void x(void)
{
  unsigned a, b;
  asm volatile ("" : "=rax" (a), "=rcx" (b) : "0" ((unsigned long) 0x0));
}

compiled with gcc-4.3 -m64 -O -c x.i 

emits:

x.i: In function ‘x’:
x.i:7: internal compiler error: in inline_secondary_memory_needed, at
config/i386/i386.c:21770
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.

Omitting -O compiles the file.

Making a and b unsigned longs also fixes it.

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-2)


-- 
           Summary: ICE with inline asm in 64bit mode because of type size
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: adam at os dot inf dot tu-dresden dot de
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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


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

* [Bug target/36722] ICE with inline asm in 64bit mode because of type size
  2008-07-03 18:54 [Bug inline-asm/36722] New: ICE with inline asm in 64bit mode because of type size adam at os dot inf dot tu-dresden dot de
@ 2008-08-11  1:28 ` pinskia at gcc dot gnu dot org
  2008-08-22 19:11 ` pluto at agmk dot net
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-11  1:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-11 01:26 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|inline-asm                  |target
     Ever Confirmed|0                           |1
      Known to fail|                            |4.0.1 4.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-11 01:26:51
               date|                            |


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


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

* [Bug target/36722] ICE with inline asm in 64bit mode because of type size
  2008-07-03 18:54 [Bug inline-asm/36722] New: ICE with inline asm in 64bit mode because of type size adam at os dot inf dot tu-dresden dot de
  2008-08-11  1:28 ` [Bug target/36722] " pinskia at gcc dot gnu dot org
@ 2008-08-22 19:11 ` pluto at agmk dot net
  2008-08-23  7:23 ` ubizjak at gmail dot com
  2008-08-23  8:00 ` schwab at suse dot de
  3 siblings, 0 replies; 7+ messages in thread
From: pluto at agmk dot net @ 2008-08-22 19:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pluto at agmk dot net  2008-08-22 19:09 -------
looks like a PR37191


-- 


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


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

* [Bug target/36722] ICE with inline asm in 64bit mode because of type size
  2008-07-03 18:54 [Bug inline-asm/36722] New: ICE with inline asm in 64bit mode because of type size adam at os dot inf dot tu-dresden dot de
  2008-08-11  1:28 ` [Bug target/36722] " pinskia at gcc dot gnu dot org
  2008-08-22 19:11 ` pluto at agmk dot net
@ 2008-08-23  7:23 ` ubizjak at gmail dot com
  2008-08-23  8:00 ` schwab at suse dot de
  3 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2008-08-23  7:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2008-08-23 07:21 -------
(In reply to comment #2)
> looks like a PR37191

No.

Register constraints in the testcase are just not what they look like.

"=rax" in fact specifies multiple constraints, and that includes:

"r" for general integer reg
"a" for rax
"x" for SSE reg

Similar for "=rcx", but with rcx instead of rax.

So the correct asm would look like this:

void x(void)
{
  unsigned long a, b;
  asm volatile ("" : "=a" (a), "=c" (b) : "0" ((unsigned long) 0x0));
}


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug target/36722] ICE with inline asm in 64bit mode because of type size
  2008-07-03 18:54 [Bug inline-asm/36722] New: ICE with inline asm in 64bit mode because of type size adam at os dot inf dot tu-dresden dot de
                   ` (2 preceding siblings ...)
  2008-08-23  7:23 ` ubizjak at gmail dot com
@ 2008-08-23  8:00 ` schwab at suse dot de
  3 siblings, 0 replies; 7+ messages in thread
From: schwab at suse dot de @ 2008-08-23  8:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from schwab at suse dot de  2008-08-23 07:58 -------
It's still an ice-on-invalid, and as such a valid bug.


-- 

schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


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


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

* [Bug target/36722] ICE with inline asm in 64bit mode because of type size
       [not found] <bug-36722-4@http.gcc.gnu.org/bugzilla/>
  2014-10-26 13:37 ` adam at os dot inf.tu-dresden.de
@ 2021-08-09  7:12 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-09  7:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36722

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There have been many changes to even inline_secondary_memory_needed which might
have fixed this.
Anyways fixed.

An example of a change to inline_secondary_memory_needed is
g:55a2c3226a3e90a6d65f19710bab1ac377054234 .
There are others like r10-2964 which might have improved things.

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

* [Bug target/36722] ICE with inline asm in 64bit mode because of type size
       [not found] <bug-36722-4@http.gcc.gnu.org/bugzilla/>
@ 2014-10-26 13:37 ` adam at os dot inf.tu-dresden.de
  2021-08-09  7:12 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: adam at os dot inf.tu-dresden.de @ 2014-10-26 13:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36722

Adam Lackorzynski <adam at os dot inf.tu-dresden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adam at os dot inf.tu-dresden.de
      Known to work|                            |4.5.4, 4.6.4, 4.7.4, 4.8.4,
                   |                            |4.9.2, 5.0
      Known to fail|                            |

--- Comment #5 from Adam Lackorzynski <adam at os dot inf.tu-dresden.de> ---
Cannot reproduce with 4.5 and later.


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

end of thread, other threads:[~2021-08-09  7:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-03 18:54 [Bug inline-asm/36722] New: ICE with inline asm in 64bit mode because of type size adam at os dot inf dot tu-dresden dot de
2008-08-11  1:28 ` [Bug target/36722] " pinskia at gcc dot gnu dot org
2008-08-22 19:11 ` pluto at agmk dot net
2008-08-23  7:23 ` ubizjak at gmail dot com
2008-08-23  8:00 ` schwab at suse dot de
     [not found] <bug-36722-4@http.gcc.gnu.org/bugzilla/>
2014-10-26 13:37 ` adam at os dot inf.tu-dresden.de
2021-08-09  7:12 ` pinskia 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).