First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 22448
Product:  
Component:  
Status: NEW
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Matthew Dempsky <mrd@alkemio.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 22448 depends on: Show dependency tree
Show dependency graph
Bug 22448 blocks:

Additional Comments:





Mark bug as waiting for feedback
Mark bug as suspended




View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-02-13 03:55 Opened: 2005-07-13 02:22
With gcc 4.0.1, compiling the following results in an ICE:

void
foo ()
{
label: asm ("" : : "g" (*&&label));
}

Admittedly I don't expect it to do anything useful, but I was told in #gcc that
I should report the ICE anyways.  (For what it's worth, this same code snippet
compiles without error in gcc 3.3 and 3.4.)

------- Comment #1 From Andrew Pinski 2005-07-13 02:24 -------
Confirmed, a regression from 3.4.0.
(In reply to comment #0)
> Admittedly I don't expect it to do anything useful, but I was told in #gcc that
> I should report the ICE anyways.

Yes by me :).

------- Comment #2 From Andrew Pinski 2005-07-28 16:35 -------
*** Bug 23110 has been marked as a duplicate of this bug. ***

------- Comment #3 From Andrew Pinski 2005-07-28 16:38 -------
Turns out this is not really a regression.  If you change g to r, it fails from
2.95.3 and up.

------- Comment #4 From Gerry 2009-02-11 13:38 -------
This also happens when dereferencing void pointers (this is invalid code
though, but I get the same error with the code in the first post):

void foo (void *p)
{
        asm("" :: "g" (*p));
}

$ gcc -c foo.c
foo.c: In function ‘foo’:
foo.c:3: warning: dereferencing ‘void *’ pointer
foo.c:3: internal compiler error: in gimplify_expr, at gimplify.c:6288
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --enable-threads=posix
--mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit
--disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu
--disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.3.3 (GCC)

First Last Prev Next    No search results available      Search page      Enter new bug