On Sun, Mar 20, 2016 at 04:13:25PM +0000, Nick Hudson wrote:
> On 03/20/16 14:41, Joerg Sonnenberger wrote:
> >On Fri, Mar 18, 2016 at 04:29:15PM +0000, Nick Hudson wrote:
> 
> >>Is there a PR that describes the clang problem?
> >I gave you a detailed explination why the old version is a problem. So
> >far I have seen no real justification for the change, other than some
> >mumblings about ld mishandling weak symbols. That seems to be a pretty
> >clear cut case for a revert and going back to the design board to
> >understand why rump started failing with new binutils.
> 
> I'm old and forgetful and need a PR.
> 
> I think at the moment it's a case of least used gets left broken until all
> problems are understood

Here is a trivial test case showing that the basic problem exists for
both clang and gcc:

   int a, b

   int f(void) {
     return &a != &b;
   }

When compiling with -O2, both return the function to "return 1". The
linker set iteration typically looks something like:
   for (iter = &start; iter != &end; ++iter)
      ...

Depending on the phase of the moon, the compiler will therefore turn
this into a do-while loop as the condition is initially false.

In short, this is a real problem and the assumption is not specific to
clang. Revert now, please.

Joerg

Reply via email to