Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.g++.bug Subject: BUG(s) in G++ 1.34.1 and 1.35.0 (pre-release) Message-ID: <8904211928.AA13546@riunite.aca.mcc.com> Date: 21 Apr 89 19:28:50 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 52 The following source file causes G++ 1.34.1 (Sun3) and G++ 1.35.0 (Sun3, pre-release from yahi April 20th) to abort. ----------------------------------------------------------------------- // Check that default arguments may be non constant expressions // #include "Testinc.h" int global_variable; const int global_const = 99; int func1 (int i); int func2 (int j); int function (int k = func2 (func1 (global_variable + global_const))); class base { int field; public: int function (int k = func2 (func1 (global_variable + global_const))); }; int test () { base b; global_variable = 99; function (); b.function (); return 0; } int function (int k = func2 (func1 (global_variable + global_const))) { return 0; } int base::function (int k = func2 (func1 (global_variable + global_const))) { return 0; } int func1 (int i) { return 1+i; } int func2 (int j) { return 2+j; }