This is the mail archive of the 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]

Re: MIPS ICE with CONST_HIGH_PART sign-extension problem

On Mon, 2009-04-27 at 19:49 +0000, Joseph S. Myers wrote:
> Since this test isn't at all MIPS-specific, it should go in 
> gcc.c-torture/compile rather than, so it can potentially 
> show up bugs on other targets or with other optimization options.

OK, here is a revised patch.  I am using the same tests as are already
used in the 20050303-1.c file in the same dir, which seems to be the
right tests to me.  I verified that the test is not run for avr-elf (it
would fail if run for that target).  I verified that the test fails for
an unpatched mips-elf build tree.  I verified that the test succeeds for
patched mips-elf and mips64-elf build trees.


2009-04-29  James E. Wilson  <>

	* gcc.c-torture/compile/const-high-part.c: New test.

Index: gcc.c-torture/compile/const-high-part.c
--- gcc.c-torture/compile/const-high-part.c	(revision 0)
+++ gcc.c-torture/compile/const-high-part.c	(revision 0)
@@ -0,0 +1,19 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target size32plus } */
+char *buf;
+int buflen;
+inline int
+sub (int length)
+  if (length <= buflen)
+    buf[length] = '\0';
+  return 0;
+sub2 (void)
+  return sub (0x7fffffff);

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