* PATCH: Add testcases for PRs 47449/47446
@ 2011-08-06 14:50 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2011-08-06 14:50 UTC (permalink / raw)
To: gcc-patches
Hi,
I checked in this patch to add testcases for PRs 47449/47446.
H.J.
Index: gcc.target/i386/pr47449.c
===================================================================
--- gcc.target/i386/pr47449.c (revision 0)
+++ gcc.target/i386/pr47449.c (revision 0)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void bar (void *, void *);
+int
+foo (void *p1, void *p2)
+{
+ int ret1, ret2;
+ __asm ("" : "=D" (ret1), "=S" (ret2));
+ bar (p1, p2);
+ return ret1 + ret2;
+}
Index: gcc.dg/pr47446-1.c
===================================================================
--- gcc.dg/pr47446-1.c (revision 0)
+++ gcc.dg/pr47446-1.c (revision 0)
@@ -0,0 +1,40 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+enum
+{
+ __GCONV_OK = 0,
+ __GCONV_NOCONV,
+ __GCONV_NODB,
+ __GCONV_NOMEM,
+ __GCONV_EMPTY_INPUT,
+ __GCONV_FULL_OUTPUT,
+ __GCONV_ILLEGAL_INPUT,
+ __GCONV_INCOMPLETE_INPUT,
+ __GCONV_ILLEGAL_DESCRIPTOR,
+ __GCONV_INTERNAL_ERROR
+};
+int
+foo (int result)
+{
+ int irreversible = 0;
+ switch (result)
+ {
+ case __GCONV_ILLEGAL_INPUT:
+ irreversible = -1L;
+ break;
+ case __GCONV_FULL_OUTPUT:
+ irreversible = -2L;
+ break;
+ case __GCONV_INCOMPLETE_INPUT:
+ irreversible = -3L;
+ break;
+ case __GCONV_EMPTY_INPUT:
+ case __GCONV_OK:
+ break;
+ default:
+ abort ();
+ }
+ return irreversible;
+}
Index: gcc.dg/pr47446-2.c
===================================================================
--- gcc.dg/pr47446-2.c (revision 0)
+++ gcc.dg/pr47446-2.c (revision 0)
@@ -0,0 +1,41 @@
+/* { dg-do assemble } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fpic" } */
+
+extern void abort (void);
+enum
+{
+ __GCONV_OK = 0,
+ __GCONV_NOCONV,
+ __GCONV_NODB,
+ __GCONV_NOMEM,
+ __GCONV_EMPTY_INPUT,
+ __GCONV_FULL_OUTPUT,
+ __GCONV_ILLEGAL_INPUT,
+ __GCONV_INCOMPLETE_INPUT,
+ __GCONV_ILLEGAL_DESCRIPTOR,
+ __GCONV_INTERNAL_ERROR
+};
+int
+foo (int result)
+{
+ int irreversible = 0;
+ switch (result)
+ {
+ case __GCONV_ILLEGAL_INPUT:
+ irreversible = -1L;
+ break;
+ case __GCONV_FULL_OUTPUT:
+ irreversible = -2L;
+ break;
+ case __GCONV_INCOMPLETE_INPUT:
+ irreversible = -3L;
+ break;
+ case __GCONV_EMPTY_INPUT:
+ case __GCONV_OK:
+ break;
+ default:
+ abort ();
+ }
+ return irreversible;
+}
Index: ChangeLog
===================================================================
--- ChangeLog (revision 177511)
+++ ChangeLog (working copy)
@@ -1,5 +1,14 @@
2011-08-06 H.J. Lu <hongjiu.lu@intel.com>
+ PR middle-end/47449
+ * gcc.target/i386/pr47449.c: New.
+
+ PR target/47446
+ * gcc.dg/pr47446-1.c: New.
+ * gcc.dg/pr47446-2.c: Likewise.
+
+2011-08-06 H.J. Lu <hongjiu.lu@intel.com>
+
PR target/47766
* gcc.dg/pr47766.c: New.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-06 14:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-06 14:50 PATCH: Add testcases for PRs 47449/47446 H.J. Lu
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).