This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Remove testsuite/gcc.c-torture/execute/20000603-1.c
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 05 Feb 2004 17:20:18 -0500
- Subject: Remove testsuite/gcc.c-torture/execute/20000603-1.c
- Organization: Red Hat Canada
This test typically fails when doing type-based alias analysis. We have
discussed this in the past but had never done anything about it.
Today it bit me again and I think the testcase is wrong. Jason agrees
and tells me that this is mentioned in C99 6.5p7
<jason> *b has a different type from *a, so it "shall" not be used to
refer to *a.
The test happens to "work" only if points-to aliasing is used or if we
were to consider all memory tags as global variables by default.
OK to remove from mainline?
Diego.
Index: gcc.c-torture/execute/20000603-1.c
===================================================================
RCS file: gcc.c-torture/execute/20000603-1.c
diff -N gcc.c-torture/execute/20000603-1.c
*** gcc.c-torture/execute/20000603-1.c 3 Jun 2000 15:01:49 -0000 1.1
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,17 ****
- struct s1 { double d; };
- struct s2 { double d; };
-
- double f(struct s1 *a, struct s2 *b)
- {
- a->d = 1.0;
- return b->d + 1.0;
- }
-
- int main()
- {
- struct s1 a;
- a.d = 0.0;
- if (f (&a, (struct s2 *)&a) != 2.0)
- abort ();
- return 0;
- }
--- 0 ----