title: is __attribute__((section(".something"))) on a static member of a template class allowed?
body: <p>in the following example clang puts the respective variables in '.aaa' and '.ggg' correctly. GCC works on '.ggg' but not on '.aaa' (the static member variable of the class template). </p>
  
  <pre><code>template&lt;int I&gt;
  struct s{
      __attribute__((section(".aaa"))) static  int a[100];
  };
  
  __attribute__((section(".ggg"))) int  b[100]; 
  
  template&lt;int I&gt;
  __attribute__((section(".aaa"))) int s&lt;I&gt;::a[100];
  </code></pre>
  
  <p>Is this a GCC bug or voluntary support on the part of clang?</p>
  
  <p>Is there a good work around (besides making s::a a global rather than a static member)?</p>
  
  <p>note: I left out the compiler version as all version of GCC on godbolt do essentially the same thing <a href="https://godbolt.org/g/E5s0mi" rel="nofollow noreferrer">https://godbolt.org/g/E5s0mi</a></p>