From 9ec99077b6a639b01274d27d17b334ebe21fc9ae Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 12 Jul 2011 21:52:37 -0700 Subject: [PATCH] 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. --- tests/libpspp/range-set-test.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/libpspp/range-set-test.c b/tests/libpspp/range-set-test.c index 03dfb3189e..1bb9238cae 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++) { -- 2.30.2