aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-06-02 18:17:15 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-06-02 18:17:15 +0200
commit0e535442f42aeec23761686a55de8557e1e4277c (patch)
tree3b31f3c4a459e8f2c4381b9ce639b18ca8d669d3 /gcc
parent4a2353126ec971d01425b1fdec42afa316804337 (diff)
downloadgcc-0e535442f42aeec23761686a55de8557e1e4277c.zip
gcc-0e535442f42aeec23761686a55de8557e1e4277c.tar.gz
gcc-0e535442f42aeec23761686a55de8557e1e4277c.tar.bz2
source_date_epoch-1.c (main): Test __DATE__ and __TIME__ strings with __builtin_strcmp instead of printf and...
* gcc.dg/cpp/source_date_epoch-1.c (main): Test __DATE__ and __TIME__ strings with __builtin_strcmp instead of printf and dg-output. From-SVN: r237039
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fcf6bbd..270bde1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-02 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/cpp/source_date_epoch-1.c (main): Test __DATE__ and
+ __TIME__ strings with __builtin_strcmp instead of printf and
+ dg-output.
+
2016-06-02 Martin Liska <mliska@suse.cz>
* gcc.dg/predict-9.c: New test.
diff --git a/gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c b/gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c
index f6aa1a3..d0a1ee0 100644
--- a/gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c
@@ -2,10 +2,10 @@
/* { dg-set-compiler-env-var SOURCE_DATE_EPOCH "630333296" } */
int
-main(void)
+main ()
{
- __builtin_printf ("%s %s\n", __DATE__, __TIME__);
+ if (__builtin_strcmp (__DATE__, "Dec 22 1989") != 0
+ || __builtin_strcmp (__TIME__, "12:34:56") != 0)
+ __builtin_abort ();
return 0;
}
-
-/* { dg-output "^Dec 22 1989 12:34:56\n$" } */