Bug 35337 - Broken diagnostic for firstprivate clause
Summary: Broken diagnostic for firstprivate clause
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Jakub Jelinek
URL:
Keywords: diagnostic, monitored, openmp
Depends on: 31748 35244
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-23 19:52 UTC by Volker Reichelt
Modified: 2008-03-10 20:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-03-10 16:04:37


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2008-02-23 19:52:41 UTC
A broken diagnostic is issued for the following invalid code snippet since
GCC 4.2.0:

====================================================
struct A {};

void foo()
{
  #pragma omp parallel firstprivate(A)
    ;
}
====================================================

bug.cc: In function 'void foo()':
bug.cc:5: error: '#'type_decl' not supported by dump_expr#<expression error>' is not a variable in clause 'firstprivate'

This is related to PR31748 and PR35244.
Comment 1 Jakub Jelinek 2008-03-10 16:04:37 UTC
Testing a patch.
Comment 2 Jakub Jelinek 2008-03-10 19:44:07 UTC
Subject: Bug 35337

Author: jakub
Date: Mon Mar 10 19:43:16 2008
New Revision: 133086

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133086
Log:
	PR c++/35337
	* semantics.c (finish_omp_clauses): Use %qD instead of %qE for
	DECL_P in not a variable and appears more than once error messages.

	* g++.dg/gomp/pr35337.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/gomp/pr35337.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Jakub Jelinek 2008-03-10 20:54:19 UTC
Subject: Bug 35337

Author: jakub
Date: Mon Mar 10 20:53:35 2008
New Revision: 133090

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133090
Log:
	PR c++/35337
	* semantics.c (finish_omp_clauses): Use %qD instead of %qE for
	DECL_P in not a variable and appears more than once error messages.

	* g++.dg/gomp/pr35337.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/gomp/pr35337.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/semantics.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog

Comment 4 Jakub Jelinek 2008-03-10 20:57:55 UTC
Fixed.