This is the mail archive of the
mailing list for the GCC project.
[committed] fix PR testsuite/29007, gcc.dg/long-long-cst1.c fails
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 10 Sep 2006 16:13:18 -0700
- Subject: [committed] fix PR testsuite/29007, gcc.dg/long-long-cst1.c fails
There are two problems with this testcase, one is that we don't return 0
on success so the test would fail on some targets. Two is that for
64bit targets this testcase would fail because we would warn about
casting from a pointer type to an integer type that are different sizes.
Committed after a test that the testcase now passes.
2006-09-10 Andrew Pinski <firstname.lastname@example.org>
* gcc.dg/long-long-cst1.c (t): Add cast to
__SIZE_TYPE__ before casting to int.
(main): Return 0 on success.
--- gcc.dg/long-long-cst1.c (revision 116830)
+++ gcc.dg/long-long-cst1.c (working copy)
@@ -7,11 +7,12 @@ extern void abort();
-unsigned long long t = ((int)&(((struct st*)16)->_mark) - 32);
+unsigned long long t = ((int)(__SIZE_TYPE__)&(((struct st*)16)->_mark) - 32);
if (t != (unsigned long long)(int)-16)
+ return 0;