public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Roger Sayle <roger@eyesopen.com>
To: <gcc-patches@gcc.gnu.org>
Cc: "Joseph S. Myers" <jsm28@cam.ac.uk>
Subject: [PATCH] New testcase for PR c/7128
Date: Thu, 07 Nov 2002 21:26:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.33.0211072158500.13610-100000@www.eyesopen.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0211040924350.24372-100000@kern.srcf.societies.cam.ac.uk>


On Mon, 4 Nov 2002, Joseph S. Myers wrote:
> > 2002-11-03  Roger Sayle  <roger@eyesopen.com>
> >
> > 	PR c/7128
> > 	* c-typeck.c (c_expand_asm_operands): Defend against
> > 	error_mark_nodes in argument "output" to avoid ICE.
>
> Testcase for testsuite?

Sorry for the delay (Rosemary Elizabeth Sayle was born 2:08pm
on Tuesday November 5th, 6lbs 15oz :>).

The following patch adds a testcase for the recently fixed GNATS
PR c/7128.  I've tested that this PASSes with current mainline
on i686-pc-linux-gnu but FAILs without my recent patch.  Interestingly
this is only the second testcase to check for an undeclared identifier.
I've also checked that the __asm__ is portable by failing to compile
on alpha/Tru64, sparc/Solaris and parisc/HPUX.

Ok for mainline?


2002-11-07  Roger Sayle  <roger@eyesopen.com>

	* gcc.dg/20021107-1.c: New testcase for PR c/7128.


*** /dev/null	Thu Aug 30 14:30:55 2001
--- gcc.dg/20021107-1.c	Mon Nov  4 14:15:06 2002
***************
*** 0 ****
--- 1,15 ----
+ /* Copyright (C) 2002 Free Software Foundation.
+
+    Test for PR c/7128, ICE on invalid code in c_expand_asm_operands.
+
+    Extracted from GNAT PR by Roger Sayle, 4th November 2002.  */
+
+ /* { dg-do compile } */
+
+ void foo ()
+ {
+   __asm__ ("foo %0" : "=r" (r));
+   /* { dg-error "undeclared"     "undeclared" { target *-*-* } { 11 } } */
+   /* { dg-error "each function it appears" "" { target *-*-* } { 11 } } */
+ }
+

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833

      reply	other threads:[~2002-11-08  5:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-03 15:36 [PATCH] PR c/7128: ICE in c_expand_asm_operands Roger Sayle
2002-11-03 16:02 ` Richard Henderson
2002-11-04  1:25 ` Joseph S. Myers
2002-11-07 21:26   ` Roger Sayle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0211072158500.13610-100000@www.eyesopen.com \
    --to=roger@eyesopen.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jsm28@cam.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).