> The test wants to ensure:
> 1) the foo calls in the ctors are invoked in increasing order (this is used
>    for inline vars defined in both CUs)
> 2) ensure that the first bar call in the ctors is invoked after foo (5)
> 3) that bar used in ctors (it is used for inline vars defined in one or the
>    other CU, but not both) is invoked either in the order
>    bar (0); bar (1); /* optionally some foo calls here */ bar (16); bar
> (17); or in the order
>    bar (16); bar (17); /* optionally some foo calls here */ bar (0); bar
> (1);
> 
> So, in what order is it run on Solaris and why does it fail?

The latter:

(gdb) run
Starting program: /sydney.a/users/botcazou/gcc-head/inline-var1 
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[Switching to Thread 1 (LWP 1)]

Breakpoint 1, bar (x=16) at inline-var1.C:29
29        if (v < 6)
(gdb) continue
Continuing.

Program received signal SIGABRT, Aborted.
0xfefcaa58 in _lwp_kill () from /lib/libc.so.1

If fails because x == 16 and w == 0 on the first invocation to bar but, given 
that w is not modified anywhere else, this seems to be expected.

-- 
Eric Botcazou

Reply via email to