* [PATCH] Fix failing gcc.dg/compare2.c
@ 2017-08-10 9:17 Marek Polacek
0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2017-08-10 9:17 UTC (permalink / raw)
To: GCC Patches
Not sure how I missed this, but a few dg-warning and dg-bogus need updating.
Tested on x86_64-linux and ppc64le-linux, applying to trunk.
2017-08-10 Marek Polacek <polacek@redhat.com>
PR testsuite/81784
* gcc.dg/compare2.c: Update dg-bogus and dg-warning.
diff --git gcc/testsuite/gcc.dg/compare2.c gcc/testsuite/gcc.dg/compare2.c
index cfadaccb8af..f742e95f605 100644
--- gcc/testsuite/gcc.dg/compare2.c
+++ gcc/testsuite/gcc.dg/compare2.c
@@ -41,18 +41,18 @@ void f(int x, unsigned int y)
y > ({tf; tf?64:(tf?128:-1);}); /* { dg-warning "different signedness" "case 16" } */
/* ?: branches are constants. */
- tf ? x : (tf?64:32); /* { dg-bogus "conditional expression" "case 17" } */
- tf ? y : (tf?64:32); /* { dg-bogus "conditional expression" "case 18" } */
+ tf ? x : (tf?64:32); /* { dg-bogus "changes signedness" "case 17" } */
+ tf ? y : (tf?64:32); /* { dg-bogus "changes signedness" "case 18" } */
/* ?: branches are signed constants. */
- tf ? x : (tf?64:-1); /* { dg-bogus "conditional expression" "case 19" } */
- tf ? y : (tf?64:-1); /* { dg-warning "conditional expression" "case 20" } */
+ tf ? x : (tf?64:-1); /* { dg-bogus "changes signedness" "case 19" } */
+ tf ? y : (tf?64:-1); /* { dg-warning "changes signedness" "case 20" } */
/* ?: branches are (recursively) constants. */
- tf ? x : (tf?64:(tf?128:256)); /* { dg-bogus "conditional expression" "case 21" } */
- tf ? y : (tf?64:(tf?128:256)); /* { dg-bogus "conditional expression" "case 22" } */
+ tf ? x : (tf?64:(tf?128:256)); /* { dg-bogus "changes signedness" "case 21" } */
+ tf ? y : (tf?64:(tf?128:256)); /* { dg-bogus "changes signedness" "case 22" } */
/* ?: branches are (recursively) signed constants. */
- tf ? x : (tf?64:(tf?128:-1)); /* { dg-bogus "conditional expression" "case 23" } */
- tf ? y : (tf?64:(tf?128:-1)); /* { dg-warning "conditional expression" "case 24" } */
+ tf ? x : (tf?64:(tf?128:-1)); /* { dg-bogus "changes signedness" "case 23" } */
+ tf ? y : (tf?64:(tf?128:-1)); /* { dg-warning "changes signedness" "case 24" } */
}
Marek
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-10 8:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 9:17 [PATCH] Fix failing gcc.dg/compare2.c Marek Polacek
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).