The call to hasExternalFormalLinkage in CGDecl.cpp should be to
hasExternalStorage. Consider:

namespace {
  int a;

  int f() {
    extern int a;
    return a;
  }
}

Here, the 'a' inside 'f' has InternalLinkage but ExternalStorage. We
definitely don't want to emit that as an automatic-storage-duration
variable. Please also add an assert(D.hasLocalStorage()) before the call to
EmitAutoVarDecl.

On Tue, May 14, 2013 at 6:08 AM, Rafael EspĂ­ndola <
[email protected]> wrote:

> > Here is a tentative fix for review: the switch on the storage class "as
> > written" is replaced by calls to semantics-aware methods.
> > (Note: as I said previously, I am not changing the special handling of
> > SC_OpenCLWorkGroupLocal storage class.)
>
> Please include the test in the patch.
>
> > Enea.
> >
>
> Cheers,
> Rafael
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to