public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63249] New: [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length
@ 2014-09-12 17:43 tschwinge at gcc dot gnu.org
2014-09-18 17:00 ` [Bug c++/63249] " jakub at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2014-09-12 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63249
Bug ID: 63249
Summary: [OpenMP] Spurious »set but not used« warnings when
actually used in OpenMP target's array section's
lower-bound and length
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: openmp
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Depends on: 63248
This is similar to what has previously been addressed in
<https://gcc.gnu.org/PR51360>,
<http://news.gmane.org/find-root.php?message_id=%3C20111215173852.GT1957%40tyan-ft48-01.lab.bos.redhat.com%3E>:
int f(int A, int B)
{
int r = 0;
extern int *v;
int a = 2;
int b = 4;
int n = 3;
v[n] = 0;
#pragma omp target map(to: v[a:b])
r |= v[n];
#pragma omp target map(to: v[A:B])
r |= v[n];
return r;
}
../../openacc/w.c: In function 'f':
../../openacc/w.c:6:7: warning: variable 'b' set but not used
[-Wunused-but-set-variable]
int b = 4;
^
../../openacc/w.c:5:7: warning: variable 'a' set but not used
[-Wunused-but-set-variable]
int a = 2;
^
../../openacc/w.c:1:11: warning: parameter 'A' set but not used
[-Wunused-but-set-parameter]
int f(int A, int B)
^
../../openacc/w.c:1:18: warning: parameter 'B' set but not used
[-Wunused-but-set-parameter]
int f(int A, int B)
^
Patch (for C) submitted in
<http://news.gmane.org/find-root.php?message_id=%3C87y4trrcsk.fsf%40schwinge.name%3E>,
C++ blocked on PR63248.
>From gcc-bugs-return-461711-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 12 17:44:10 2014
Return-Path: <gcc-bugs-return-461711-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29210 invoked by alias); 12 Sep 2014 17:44:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29128 invoked by uid 48); 12 Sep 2014 17:44:07 -0000
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/34777] uClibc-0.9.29 compilation error for sh4 arch with gcc-4.x
Date: Fri, 12 Sep 2014 17:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.2.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: olegendo at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: dependson
Message-ID: <bug-34777-4-2IXraUsxRB@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-34777-4@http.gcc.gnu.org/bugzilla/>
References: <bug-34777-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-09/txt/msg01545.txt.bz2
Content-length: 1145
https://gcc.gnu.org/bugzilla/show_bug.cgi?id4777
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |55212
--- Comment #12 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #11)
>
> seems to fix the test case of PR 34807. However, I've not tested it any
> further and probably the fix is incomplete and works only for mem loads and
> not stores.
> In fact it can be broken again quite easily by inserting another insn that
> requires R0 (tst #imm,r0 in this case):
>
> int glob, glob1;
>
> static int _dl_mmap (int xx)
> {
> register int __sc0 __asm__ ("r0") = glob1;
> register int __sc1 __asm__ ("r1") = glob;
>
> if (xx & 3)
> __asm__ ("trapa %1 " : "=z" (__sc0) : "i" (0x10), "0" (__sc0), "r"
> (__sc1));
>
> return (__sc0);
> }
>
> void _start(int xx)
> {
> static int buf;
> buf = _dl_mmap(xx);
> }
I've tried that test case with the sh-lra branch and the problems seem to be
gone.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63249] [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length
2014-09-12 17:43 [Bug c++/63249] New: [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length tschwinge at gcc dot gnu.org
@ 2014-09-18 17:00 ` jakub at gcc dot gnu.org
2014-09-24 15:19 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-18 17:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63249
Bug 63249 depends on bug 63248, which changed state.
Bug 63248 Summary: Crash when OpenMP target's array section handling is used with templates
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63248
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63249] [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length
2014-09-12 17:43 [Bug c++/63249] New: [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length tschwinge at gcc dot gnu.org
2014-09-18 17:00 ` [Bug c++/63249] " jakub at gcc dot gnu.org
@ 2014-09-24 15:19 ` jakub at gcc dot gnu.org
2014-09-25 6:48 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-24 15:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63249
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-09-24
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 33549
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33549&action=edit
gcc5-pr63249.patch
Untested fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63249] [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length
2014-09-12 17:43 [Bug c++/63249] New: [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length tschwinge at gcc dot gnu.org
2014-09-18 17:00 ` [Bug c++/63249] " jakub at gcc dot gnu.org
2014-09-24 15:19 ` jakub at gcc dot gnu.org
@ 2014-09-25 6:48 ` jakub at gcc dot gnu.org
2014-09-25 6:51 ` jakub at gcc dot gnu.org
2014-09-25 6:56 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-25 6:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63249
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Sep 25 06:47:43 2014
New Revision: 215580
URL: https://gcc.gnu.org/viewcvs?rev=215580&root=gcc&view=rev
Log:
PR c++/63249
* semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
on low_bound and length.
* g++.dg/gomp/pr63249.C: New test.
* c-c++-common/gomp/pr63249.c: New test.
2014-09-25 Thomas Schwinge <thomas@codesourcery.com>
PR c++/63249
* c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
on low_bound and length.
Added:
trunk/gcc/testsuite/c-c++-common/gomp/pr63249.c
trunk/gcc/testsuite/g++.dg/gomp/pr63249.C
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-parser.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63249] [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length
2014-09-12 17:43 [Bug c++/63249] New: [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length tschwinge at gcc dot gnu.org
` (2 preceding siblings ...)
2014-09-25 6:48 ` jakub at gcc dot gnu.org
@ 2014-09-25 6:51 ` jakub at gcc dot gnu.org
2014-09-25 6:56 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-25 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63249
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Sep 25 06:50:58 2014
New Revision: 215581
URL: https://gcc.gnu.org/viewcvs?rev=215581&root=gcc&view=rev
Log:
PR c++/63249
* semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
on low_bound and length.
* g++.dg/gomp/pr63249.C: New test.
* c-c++-common/gomp/pr63249.c: New test.
2014-09-25 Thomas Schwinge <thomas@codesourcery.com>
PR c++/63249
* c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
on low_bound and length.
Added:
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/gomp/pr63249.c
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/gomp/pr63249.C
Modified:
branches/gcc-4_9-branch/gcc/c/ChangeLog
branches/gcc-4_9-branch/gcc/c/c-parser.c
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/semantics.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63249] [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length
2014-09-12 17:43 [Bug c++/63249] New: [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length tschwinge at gcc dot gnu.org
` (3 preceding siblings ...)
2014-09-25 6:51 ` jakub at gcc dot gnu.org
@ 2014-09-25 6:56 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-25 6:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63249
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-25 6:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 17:43 [Bug c++/63249] New: [OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length tschwinge at gcc dot gnu.org
2014-09-18 17:00 ` [Bug c++/63249] " jakub at gcc dot gnu.org
2014-09-24 15:19 ` jakub at gcc dot gnu.org
2014-09-25 6:48 ` jakub at gcc dot gnu.org
2014-09-25 6:51 ` jakub at gcc dot gnu.org
2014-09-25 6:56 ` jakub 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).