public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/48552] New: ICE with void type expressions in asm inputs/outputs
@ 2011-04-11 12:14 jakub at gcc dot gnu.org
  2011-04-11 12:28 ` [Bug c/48552] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-11 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE with void type expressions in asm inputs/outputs
           Product: gcc
           Version: 4.6.0
               URL: https://bugzilla.redhat.com/show_bug.cgi?id=693986
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: jakub@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


struct S;

void
f1 (void *x)
{
  __asm volatile ("" : : "r" (*x));
}

void
f2 (void *x)
{
  __asm volatile ("" : "=r" (*x));
}

void
f3 (void *x)
{
  __asm volatile ("" : : "m" (*x));
}

void
f4 (void *x)
{
  __asm volatile ("" : "=m" (*x));
}

void
f5 (void *x)
{
  __asm volatile ("" : : "g" (*x));
}

void
f6 (void *x)
{
  __asm volatile ("" : "=g" (*x));
}

void
f7 (struct S *x)
{
  __asm volatile ("" : : "r" (*x));
}

void
f8 (struct S *x)
{
  __asm volatile ("" : "=r" (*x));
}

void
f9 (void *x)
{
  __asm ("" : : "r" (*x));
}

void
f10 (void *x)
{
  __asm ("" : "=r" (*x));
}

void
f11 (void *x)
{
  __asm ("" : : "m" (*x));
}

void
f12 (void *x)
{
  __asm ("" : "=m" (*x));
}

void
f13 (void *x)
{
  __asm ("" : : "g" (*x));
}
void
f14 (void *x)
{
  __asm ("" : "=g" (*x));
}

void
f15 (struct S *x)
{
  __asm ("" : : "r" (*x));
}

void
f16 (struct S *x)
{
  __asm ("" : "=r" (*x));
}

ICEs back to 3.2-ish gcc at least, correctly errors out with C++.


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

* [Bug c/48552] ICE with void type expressions in asm inputs/outputs
  2011-04-11 12:14 [Bug c/48552] New: ICE with void type expressions in asm inputs/outputs jakub at gcc dot gnu.org
@ 2011-04-11 12:28 ` jakub at gcc dot gnu.org
  2011-04-12  6:27 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-11 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-11 12:28:31 UTC ---
Created attachment 23954
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23954
gcc46-pr48552.patch

Untested fix.


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

* [Bug c/48552] ICE with void type expressions in asm inputs/outputs
  2011-04-11 12:14 [Bug c/48552] New: ICE with void type expressions in asm inputs/outputs jakub at gcc dot gnu.org
  2011-04-11 12:28 ` [Bug c/48552] " jakub at gcc dot gnu.org
@ 2011-04-12  6:27 ` jakub at gcc dot gnu.org
  2011-04-12  7:04 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-12  6:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-12 06:27:27 UTC ---
Author: jakub
Date: Tue Apr 12 06:27:23 2011
New Revision: 172298

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172298
Log:
    PR c/48552
    * c-typeck.c (build_asm_expr): Error out on attempts to use
    void type outputs or inputs for constraints that allow reg or
    don't allow memory.

    * gcc.dg/pr48552-1.c: New test.
    * gcc.dg/pr48552-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr48552-1.c
    trunk/gcc/testsuite/gcc.dg/pr48552-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-typeck.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c/48552] ICE with void type expressions in asm inputs/outputs
  2011-04-11 12:14 [Bug c/48552] New: ICE with void type expressions in asm inputs/outputs jakub at gcc dot gnu.org
  2011-04-11 12:28 ` [Bug c/48552] " jakub at gcc dot gnu.org
  2011-04-12  6:27 ` jakub at gcc dot gnu.org
@ 2011-04-12  7:04 ` jakub at gcc dot gnu.org
  2021-09-10 23:14 ` pinskia at gcc dot gnu.org
  2021-09-10 23:15 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-12  7:04 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-12 07:04:44 UTC ---
Fixed.


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

* [Bug c/48552] ICE with void type expressions in asm inputs/outputs
  2011-04-11 12:14 [Bug c/48552] New: ICE with void type expressions in asm inputs/outputs jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-04-12  7:04 ` jakub at gcc dot gnu.org
@ 2021-09-10 23:14 ` pinskia at gcc dot gnu.org
  2021-09-10 23:15 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-10 23:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0

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

* [Bug c/48552] ICE with void type expressions in asm inputs/outputs
  2011-04-11 12:14 [Bug c/48552] New: ICE with void type expressions in asm inputs/outputs jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-09-10 23:14 ` pinskia at gcc dot gnu.org
@ 2021-09-10 23:15 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-10 23:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrd at alkemio dot org

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 22448 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2021-09-10 23:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 12:14 [Bug c/48552] New: ICE with void type expressions in asm inputs/outputs jakub at gcc dot gnu.org
2011-04-11 12:28 ` [Bug c/48552] " jakub at gcc dot gnu.org
2011-04-12  6:27 ` jakub at gcc dot gnu.org
2011-04-12  7:04 ` jakub at gcc dot gnu.org
2021-09-10 23:14 ` pinskia at gcc dot gnu.org
2021-09-10 23:15 ` 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).