From: Ben Pfaff Date: Wed, 13 Jul 2011 04:52:37 +0000 (-0700) Subject: range-set: Skip some tests on llvm-gcc 4.2. X-Git-Tag: v0.7.9~167 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=9ec99077b6a639b01274d27d17b334ebe21fc9ae range-set: Skip some tests on llvm-gcc 4.2. 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 for reporting the problem. --- diff --git a/tests/libpspp/range-set-test.c b/tests/libpspp/range-set-test.c index 03dfb318..1bb9238c 100644 --- a/tests/libpspp/range-set-test.c +++ b/tests/libpspp/range-set-test.c @@ -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++) {