This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/71536] lto1 ICE: func-static constant in openmp offloaded function
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jun 2016 14:53:17 +0000
- Subject: [Bug lto/71536] lto1 ICE: func-static constant in openmp offloaded function
- Auto-submitted: auto-generated
- References: <bug-71536-4 at http dot gcc dot gnu dot org/bugzilla/>
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.