LTO: Fix writing of toplevel asm with offloading [PR109816]
When offloading was enabled, top-level 'asm' were added to the offloading section, confusing assemblers which did not support the syntax. Additionally, with offloading and -flto, the top-level assembler code did not end up in the host files. As r14-321-g9a41d2cdbcd added top-level 'asm' to one libstdc++ header file, the issue became more apparent, causing fails with nvptx for some C++ testcases. PR libstdc++/109816 gcc/ChangeLog: * lto-cgraph.cc (output_symtab): Guard lto_output_toplevel_asms by '!lto_stream_offload_p'. libgomp/ChangeLog: * testsuite/libgomp.c++/target-map-class-1.C: New test. * testsuite/libgomp.c++/target-map-class-2.C: New test. (cherry picked from commit a835f046)
Showing
- gcc/lto-cgraph.cc 1 addition, 1 deletiongcc/lto-cgraph.cc
- libgomp/testsuite/libgomp.c++/target-map-class-1.C 98 additions, 0 deletionslibgomp/testsuite/libgomp.c++/target-map-class-1.C
- libgomp/testsuite/libgomp.c++/target-map-class-2.C 6 additions, 0 deletionslibgomp/testsuite/libgomp.c++/target-map-class-2.C
Loading
Please register or sign in to comment