diff options
author | Joseph Myers <josmyers@redhat.com> | 2024-11-30 16:15:51 +0000 |
---|---|---|
committer | Joseph Myers <josmyers@redhat.com> | 2024-11-30 16:15:51 +0000 |
commit | abea0dbd63ddb7e16d13806df929e1ef3b060091 (patch) | |
tree | 74811a4390c78a3b8ab9c5a16e311943b1a5ba32 /libgcc/libgcc2.h | |
parent | 5297795e5b9e86fd2085a8f739f43fc28fb5e522 (diff) | |
download | gcc-abea0dbd63ddb7e16d13806df929e1ef3b060091.zip gcc-abea0dbd63ddb7e16d13806df929e1ef3b060091.tar.gz gcc-abea0dbd63ddb7e16d13806df929e1ef3b060091.tar.bz2 |
gimplify: Handle void expression as asm input [PR100501, PR100792]
As reported in bug 100501 (plus duplicates), the gimplifier ICEs for C
tests involving a statement expression not returning a value as an asm
input; this includes the variant bug 100792 where the statement
expression ends with another asm statement.
The expected diagnostic for this case (as seen for C++ input) is one
coming from the gimplifier and so it seems reasonable to fix the
gimplifier to handle the GENERIC generated for this case by the C
front end, rather than trying to make the C front end detect it
earlier. Thus the gimplifier to handle a void
expression like other non-lvalues for such a memory input.
Bootstrapped with no regressions for x86_64-pc-linux-gnu. OK to commit?
PR c/100501
PR c/100792
gcc/
* gimplify.cc (gimplify_asm_expr): Handle void expressions for
memory inputs like other non-lvalues.
gcc/testsuite/
* gcc.dg/pr100501-1.c, gcc.dg/pr100792-1.c: New tests.
* gcc.dg/pr48552-1.c, gcc.dg/pr48552-2.c,
gcc.dg/torture/pr98601.c: Update expected errors.
Co-authored-by: Richard Biener <rguenther@suse.de>
Diffstat (limited to 'libgcc/libgcc2.h')
0 files changed, 0 insertions, 0 deletions