https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82236
Bug ID: 82236
Summary: Offloading with -fno-use-linker-plugin fails, poor
diagnostics
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: lto, openacc, openmp
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: amonakov at gcc dot gnu.org
Target Milestone: ---
When linker plugin is not used (either due to old Binutils, or
-fno-use-linker-plugin), compiling code with offloading fails:
int main()
{
#pragma omp target
;
}
$ gcc -Os -fopenmp -fno-use-linker-plugin
gcc: warning: ‘-x lto’ after last input file has no effect
gcc: fatal error: no input files
compilation terminated.
lto-wrapper: fatal error: ./gcc returned 1 exit status
compilation terminated.
collect2: fatal error: lto-wrapper returned 1 exit status
compilation terminated.
(even with -foffload=disable). Surprisingly, adding either -fno-lto or -flto
(huh?) suppresses the failure, but the offloading compiler is not invoked.
I think this used to "work" in simple situations and got completely broken by
fix for PR 68463. At least issuing a sensible diagnostic would be nice.