3 // GROUPS passed references
4 // Check that if a reference is initialized to refer to a value
5 // which is returned from a function call, the actual call to
6 // the function is only invoked for the original initialization
7 // of the reference, and not for each subsequent use of the
10 // This test fails with G++ 1.35.0- (pre-release).
11 // Reported 4/4/89 by Kim Smith
13 extern "C" int printf (const char *, ...);
16 mutable int data_member;
19 void function_member () const;
24 base base_returning_function ();
30 const base& base_ref = base_returning_function ();
32 base_ref.function_member ();
33 base_ref.function_member ();
34 base_ref.data_member = 99;
39 { printf ("FAIL\n"); return 1; }
44 base base_returning_function ()
46 base local_base_object;
49 return local_base_object;
52 void base::function_member () const