This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Remove testsuite/gcc.c-torture/execute/20000603-1.c


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 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]