public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/101551] New: [offloading] Differences in diagnostics etc.
@ 2021-07-21 12:34 tschwinge at gcc dot gnu.org
2021-07-21 13:01 ` [Bug middle-end/101551] " tschwinge at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2021-07-21 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101551
Bug ID: 101551
Summary: [offloading] Differences in diagnostics etc.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: openacc, openmp
Severity: minor
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org
Target Milestone: ---
There are differences in diagnostics etc. depending on whether offloading is
disabled or enabled, as we already had found in
<http://mid.mail-archive.com/87pmyg4y9s.fsf@euler.schwinge.homeip.net>
"openacc: Warnings for strange partitioning choices for parallel regions" and
following.
Additionally, I just noticed that calling 'lang_hooks.decl_printable_name
(current_function_decl, 2)' in 'gcc/omp-offload.c:execute_oacc_device_lower'
for an OpenACC 'routine' 'void ROUTINE (float)', for C that returns 'ROUTINE',
for C++ 'ROUTINE(float)' for offloading enabled and 'void ROUTINE(float)'
otherwise (notice difference regarding return type), for corresponding Fortran
'routine_' for offloading enabled and 'routine' otherwise (notice difference in
'_' suffix).
Low priority certainly, but would be nice to fix/unify at some point, because
this occasionally necessitates special care when writing testcases.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/101551] [offloading] Differences in diagnostics etc.
2021-07-21 12:34 [Bug middle-end/101551] New: [offloading] Differences in diagnostics etc tschwinge at gcc dot gnu.org
@ 2021-07-21 13:01 ` tschwinge at gcc dot gnu.org
2021-09-06 13:42 ` tschwinge at gcc dot gnu.org
2022-07-12 6:28 ` cvs-commit at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2021-07-21 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101551
--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Similarly, when calling 'lang_hooks.decl_printable_name (current_function_decl,
2)' in 'gcc/omp-offload.c:execute_oacc_device_lower' for:
#pragma acc routine
template <typename T> T
ROUTINE(int val)
{ [...] }
..., for 'ROUTINE<float>' instantiated that returns 'ROUTINE<float>(int)float'
for offloading enabled and 'T ROUTINE(int) [with T = float]' otherwise.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/101551] [offloading] Differences in diagnostics etc.
2021-07-21 12:34 [Bug middle-end/101551] New: [offloading] Differences in diagnostics etc tschwinge at gcc dot gnu.org
2021-07-21 13:01 ` [Bug middle-end/101551] " tschwinge at gcc dot gnu.org
@ 2021-09-06 13:42 ` tschwinge at gcc dot gnu.org
2022-07-12 6:28 ` cvs-commit at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2021-09-06 13:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101551
--- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
I've noticed that with an offloading-enabled build of GCC we're losing "note:
in expansion of macro '[...]'" diagnostics. (Effectively
'-ftrack-macro-expansion=0'?)
For example, 'libgomp.oacc-c-c++-common/vred2d-128.c' with '-fopenacc
-Wuninitialized' for a (default) GCC build without
'--enable-offload-targets=[...]':
[...]
[...]/libgomp.oacc-c-c++-common/vred2d-128.c: In function ‘test1’:
[...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t1’ is used
uninitialized [-Wuninitialized]
34 | "acc loop vector reduction(+:t1) reduction(-:t2)")
| ^ ~
[...]/libgomp.oacc-c-c++-common/vred2d-128.c:11:14: note: ‘t1’ was declared
here
11 | long i, j, t1, t2, t3; \
| ^~
[...]/libgomp.oacc-c-c++-common/vred2d-128.c:33:1: note: in expansion of
macro ‘gentest’
33 | gentest (test1, "acc parallel loop gang vector_length (128)
firstprivate (t1, t2)",
| ^~~~~~~
[...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t2’ is used
uninitialized [-Wuninitialized]
[...]
... vs. a GCC build with '--enable-offload-targets=[...]':
[...]
[...]/libgomp.oacc-c-c++-common/vred2d-128.c: In function ‘test1’:
[...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t1’ is used
uninitialized [-Wuninitialized]
34 | "acc loop vector reduction(+:t1) reduction(-:t2)")
| ^ ~
[...]/libgomp.oacc-c-c++-common/vred2d-128.c:11:14: note: ‘t1’ was declared
here
11 | long i, j, t1, t2, t3; \
| ^~
[...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t2’ is used
uninitialized [-Wuninitialized]
[...]
Note that an explicit '-foffload=disable' does not cure this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/101551] [offloading] Differences in diagnostics etc.
2021-07-21 12:34 [Bug middle-end/101551] New: [offloading] Differences in diagnostics etc tschwinge at gcc dot gnu.org
2021-07-21 13:01 ` [Bug middle-end/101551] " tschwinge at gcc dot gnu.org
2021-09-06 13:42 ` tschwinge at gcc dot gnu.org
@ 2022-07-12 6:28 ` cvs-commit at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-12 6:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101551
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Schwinge <tschwinge@gcc.gnu.org>:
https://gcc.gnu.org/g:3723aedaad20a129741c2f6f3c22b3dd1220a3fc
commit r13-1611-g3723aedaad20a129741c2f6f3c22b3dd1220a3fc
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue Jul 12 08:17:37 2022 +0200
XFAIL 'offloading_enabled' diagnostics issue in
'libgomp.oacc-c-c++-common/reduction-5.c' [PR101551]
Fix-up for recent commit 06b2a2abe26554c6f9365676683d67368cbba206
"Enhance '_Pragma' diagnostics verification in OMP C/C++ test cases".
Supposedly it's the same issue as in
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101551#c2>, where I'd
noted that:
| [...] with an offloading-enabled build of GCC we're losing
| "note: in expansion of macro '[...]'" diagnostics.
| (Effectively '-ftrack-macro-expansion=0'?)
PR middle-end/101551
libgomp/
* testsuite/libgomp.oacc-c-c++-common/reduction-5.c: XFAIL
'offloading_enabled' diagnostics issue.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-12 6:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 12:34 [Bug middle-end/101551] New: [offloading] Differences in diagnostics etc tschwinge at gcc dot gnu.org
2021-07-21 13:01 ` [Bug middle-end/101551] " tschwinge at gcc dot gnu.org
2021-09-06 13:42 ` tschwinge at gcc dot gnu.org
2022-07-12 6:28 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).