bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SEGV running tests on IRIX 6.5.19m


From: Albert Chin-A-Young
Subject: Re: SEGV running tests on IRIX 6.5.19m
Date: Thu, 27 May 2004 03:13:38 -0500
User-agent: Mutt/1.5.6i

On Thu, May 27, 2004 at 12:44:13AM -0700, Paul Eggert wrote:
> address@hidden writes:
> 
> > Now I'm left with the following failures:
> >    To: <address@hidden>
> >    Subject: [GNU Bison 1.875d] testsuite: 43 84 86 87 88 89 failed
> 
> Those are all C++ tests so perhaps it's a problem with your C++ setup.
> But I see that 85 succeeded (it's a C++ test) so it can't be all that
> simple.  Let's start on the next one.  What does the command
> 
> cd tests; ./testsuite -v -d 43
> 
> output?

What's odd is that the Tru64 UNIX build skips test 43 and the IRIX
build fails on it, even though both have a C++ compiler.

(Tru64 UNIX 5.1)
$ ./testsuite -v -d 43
43. actions.at:557: testing ...
actions.at:557: bison -o input.c input.y
actions.at:557: $CXX --version || exit 77
stderr:
cxx: Error: No source or object files specified on the command line
stdout:
43. actions.at:557: skipped (actions.at:557)

(IRIX 6.5)
$ ./testsuite -v -d 43
43. actions.at:557: testing ...
actions.at:557: bison -o input.c input.y
actions.at:557: $CXX --version || exit 77
stderr:
CC ERROR:  -- not allowed in non XPG4 environment
CC ERROR parsing --version:  unknown flag
MIPSpro Compilers: Version 7.41
stdout:
actions.at:557: $CXX $CXXFLAGS $CPPFLAGS input.c -o input
stderr:
cc-1398 CC: ERROR File = input.y, Line = 159
  A constructor or destructor cannot have its address taken.

    yy::Parser parser (yydebug, yy::Location::Location ());
                                ^

1 error detected in the compilation of "input.c".
stdout:
actions.at:557: exit code was 2, expected 0
43. actions.at:557: FAILED (actions.at:557)

The fix is to replace "yy::Location::Location" with "yy::Location".
I've attached a patch. All tests now pass with this patch.

Ok, I see why Tru64 UNIX skips the tests:
  $ cxx --version
  cxx: Error: No source or object files specified on the command line
  $ echo $?
  1

Can we do something better with the following in local.at to work
around passing possibly invalid options to the C++ compiler:
  # AT_COMPILE_CXX(OUTPUT, [SOURCES = OUTPUT.c])
  # --------------------------------------------
  # If the C++ compiler is not defined, ignore the test.
  m4_define([AT_COMPILE_CXX],
  [AT_KEYWORDS(c++)
  AT_CHECK([$CXX --version || exit 77], 0, ignore, ignore)
  AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS m4_default([$2], [$1.c]) -o $1],
           0, [ignore], [ignore])])

-- 
albert chin (address@hidden)

-- snip snip
2004-05-27  Albert Chin-A-Young  <address@hidden>

        * tests/calc.at, tests/actions.at: Workaround for SGI
        C++ compiler.

--- tests/calc.at.orig  2004-05-27 03:05:38.186145000 -0500
+++ tests/calc.at       2004-05-27 03:05:54.336655000 -0500
@@ -144,7 +144,7 @@
 int
 yyparse (AT_PARAM_IF([semantic_value *result, int *count]))
 {
-  yy::Parser parser (!!YYDEBUG[]AT_LOCATION_IF([, yy::Location::Location 
()])AT_PARAM_IF([, result, count]));
+  yy::Parser parser (!!YYDEBUG[]AT_LOCATION_IF([, yy::Location 
()])AT_PARAM_IF([, result, count]));
   return parser.parse ();
 }
 ],
--- tests/actions.at.orig       2004-05-27 03:05:34.525790000 -0500
+++ tests/actions.at    2004-05-27 03:05:50.397478000 -0500
@@ -476,7 +476,7 @@
 int
 yyparse ()
 {
-  yy::Parser parser (yydebug, yy::Location::Location ());
+  yy::Parser parser (yydebug, yy::Location ());
   return parser.parse ();
 }
 ],




reply via email to

[Prev in Thread] Current Thread [Next in Thread]