https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88061

Felix Jones <fewix3000 at hotmail dot co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fewix3000 at hotmail dot co.uk

--- Comment #2 from Felix Jones <fewix3000 at hotmail dot co.uk> ---
Related bug 70435

Here's a demonstration of the issue with GCC trunk x86-64 on godbolt:
https://godbolt.org/z/9GFWZR

Minimal example for reproducing:
>  template<int x>
>  __attribute__( ( used, section( ".my_section" ) ) ) const int s_value { x };
>  
>  int main( int argc, char * argv[] ) {
>    return s_value<3>;
>  }

Current behaviour: s_value within section .rodata
Desired behaviour: s_value within section .my_section

Clang trunk demonstrates the desired behaviour: https://godbolt.org/z/t8FNe0

Reply via email to