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]

Committed: test-case execute/20020227-1.c for moving SCmode; problemseen with MMIX.


As promised in
<URL:http://gcc.gnu.org/ml/gcc-patches/2002-02/msg01907.html>.
Related to g77.f-torture/execute/labug1.f, but that test isn't
really storing to an unaligned SCmode, there's just a bug
causing f771 to think it does.  This test-case still fails when
I revert the changes causing labug1.f to fail.  Hence worth a
test on its own.  Even more as it fails at -O1 and -O0 too, not
just the original -O2, -Os and above, probably related to adding
f2.

gcc/testsuite:

	* gcc.c-torture/execute/20020227-1.c: New test.

*** /dev/null	Tue Jan  1 05:00:00 1980
--- gcc.c-torture/execute/20020227-1.c	Wed Feb 27 22:06:18 2002
***************
*** 0 ****
--- 1,30 ----
+ /* This testcase failed on mmix-knuth-mmixware.  Problem was with storing
+    to an unaligned mem:SC, gcc tried doing it by parts from a (concat:SC
+    (reg:SF 293) (reg:SF 294)).  */
+
+ typedef __complex__ float cf;
+ struct x { char c; cf f; } __attribute__ ((__packed__));
+ extern void f2 (struct x*);
+ extern void f1 (void);
+ int
+ main (void)
+ {
+   f1 ();
+   exit (0);
+ }
+
+ void
+ f1 (void)
+ {
+   struct x s;
+   s.f = 1;
+   s.c = 42;
+   f2 (&s);
+ }
+
+ void
+ f2 (struct x *y)
+ {
+   if (y->f != 1 || y->c != 42)
+     abort ();
+ }

brgds, H-P


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