This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/71535] ICE in LTO1 with -fopenmp offloading
- 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:10:21 +0000
- Subject: [Bug lto/71535] ICE in LTO1 with -fopenmp offloading
- Auto-submitted: auto-generated
- References: <bug-71535-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71535
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org,
| |jakub at gcc dot gnu.org
--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
I wonder if the testcase has invalid code. On one hand, without "omp declare
target" on 'Process', the compiler does not need to emit accel code for it, so
it would fail to link at mkoffload/link time. On the other hand, the intention
seems to be to allow code with references to standard functions (at least
libm/libc), even though those functions don't have "omp declare target" on
their external declarations. And, it doesn't look like that the OpenMP 4.5 spec
explicitly makes this invalid. For variables, 2.10.4 mentions that "A variable
referenced in a target region but not the target construct that is not declared
in the target region must appear in a declare target directive."
In any case, the compiler should fail more gracefully than ICE.
Minimal testcase is just
void foo ()
{
asm ("");
}
int main ()
{
#pragma omp target
foo ();
}