range-set: Skip some tests on llvm-gcc 4.2. 20110806030502/pspp 20110807030502/pspp 20110808030503/pspp 20110810030501/pspp 20110811030503/pspp 20110812030503/pspp 20110813030502/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 13 Jul 2011 04:52:37 +0000 (21:52 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 6 Aug 2011 04:36:06 +0000 (21:36 -0700)
These tests seem to trigger a bug in llvm-gcc 4.2 on Mac OS X
10.8.0.  Experimentation shows that the bug is more likely to
be triggered by the test code than the code under test, so skip
them.

I spent some time trying to narrow down the problem enough to
make a bug report to the llvm-gcc developers, but I ran out of
time before I finished with that.

Thanks to Jeremy Lavergne <jeremy@lavergne.gotdns.org> for
reporting the problem.

tests/libpspp/range-set-test.c

index 03dfb3189e18db2af7798ba1d94fead53e3ec2e7..1bb9238caebc0de8e753047f85a064f98becd1ce 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -280,6 +280,12 @@ test_insert (void)
   unsigned int init_pat;
   int i, j;
 
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 2 && __llvm__
+  /* This test seems to trigger a bug in llvm-gcc 4.2 on Mac OS X 10.8.0.
+     Exit code 77 tells the Autotest framework that the test was skipped. */
+  exit (77);
+#endif
+
   for (init_pat = 0; init_pat < (1u << positions); init_pat++)
     for (i = 0; i < positions + 1; i++)
       for (j = i; j <= positions + 1; j++)
@@ -307,6 +313,12 @@ test_delete (void)
   unsigned int init_pat;
   int i, j;
 
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 2 && __llvm__
+  /* This test seems to trigger a bug in llvm-gcc 4.2 on Mac OS X 10.8.0.
+     Exit code 77 tells the Autotest framework that the test was skipped. */
+  exit (77);
+#endif
+
   for (init_pat = 0; init_pat < (1u << positions); init_pat++)
     for (i = 0; i < positions + 1; i++)
       for (j = i; j <= positions + 1; j++)
@@ -331,6 +343,12 @@ test_allocate (void)
   unsigned int init_pat;
   int request;
 
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 2 && __llvm__
+  /* This test seems to trigger a bug in llvm-gcc 4.2 on Mac OS X 10.8.0.
+     Exit code 77 tells the Autotest framework that the test was skipped. */
+  exit (77);
+#endif
+
   for (init_pat = 0; init_pat < (1u << positions); init_pat++)
     for (request = 1; request <= positions + 1; request++)
       {
@@ -381,6 +399,12 @@ test_allocate_fully (void)
   unsigned int init_pat;
   int request;
 
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 2 && __llvm__
+  /* This test seems to trigger a bug in llvm-gcc 4.2 on Mac OS X 10.8.0.
+     Exit code 77 tells the Autotest framework that the test was skipped. */
+  exit (77);
+#endif
+
   for (init_pat = 0; init_pat < (1u << positions); init_pat++)
     for (request = 1; request <= positions + 1; request++)
       {