This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/71536] lto1 ICE: func-static constant in openmp offloaded function


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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amonakov at gcc dot gnu.org

--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
The ICE triggers when the static variable is optimized out. This passes:

#pragma omp declare target
void foo ()
{
  static int __attribute__((used)) v;
}
#pragma omp end declare target

int main()
{
  #pragma omp target
  foo();
}

With s/used/unused/ it ICEs.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]