- To: gcc-help@xxxxxxxxxxx
- Subject: Where is OMP_CLAUSE_CHECK defined?
- From: Amittai Aviram <amittai.aviram@xxxxxxxx>
- Date: Thu, 9 Feb 2012 20:53:54 -0500
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329443661; h=Comment: DomainKey-Signature:Received:Received:Received:Received:From: Content-Type:Content-Transfer-Encoding:Subject:Date:Message-Id: To:Mime-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=tnCijKu 246caJeBLPgLQX8Ql2hU=; b=hyFcd0tAykveNjgIhhR3nw2lvwuW5ggmjGhvALe NXiYFUhPPrZxlHAl+9r+Iv0S8Snet4kFgQ0NbTOWC1fNEP4KCvdqyC16A5UsJN7/ 1GxwsOraIRDbePeSmFN7pB/1nIKnbqv8vA2vODeGmmKok1FDxF+xdRUAO9FwdBgY WGEQ=
I am trying understand more about how GCC compiles OpenMP directives and clauses by studying gcc/gcc/omp-low.c . I've run across the macro OMP_CLAUSE_DECL, which is tree.h defines:
#define OMP_CLAUSE_DECL(NODE) \
OMP_CLAUSE_OPERAND (OMP_CLAUSE_RANGE_CHECK (OMP_CLAUSE_CHECK (NODE), \
OMP_CLAUSE_PRIVATE, \
OMP_CLAUSE_COPYPRIVATE), 0)
Now, for OMP_CLAUSE_OPERAND, tree.h has
#define OMP_CLAUSE_OPERAND(NODE, I) \
OMP_CLAUSE_ELT_CHECK (NODE, I)
And for OMP_CLAUSE_ELT_CHECK, it has
#define OMP_CLAUSE_ELT_CHECK(T, I) __extension__ \
(*({__typeof (T) const __t = (T); \
const int __i = (I); \
if (TREE_CODE (__t) != OMP_CLAUSE) \
tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
OMP_CLAUSE, 0); \
if (__i < 0 || __i >= omp_clause_num_ops [__t->omp_clause.code]) \
omp_clause_operand_check_failed (__i, __t, __FILE__, __LINE__, \
__FUNCTION__); \
&__t->omp_clause.ops[__i]; }))
Similarly, tree.h defines OMP_CLAUSE_RANGE_CHECK:
#define OMP_CLAUSE_RANGE_CHECK(T, CODE1, CODE2) __extension__ \
({ __typeof (T) const __t = (T); \
if (TREE_CODE (__t) != OMP_CLAUSE) \
tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
OMP_CLAUSE, 0); \
if ((int) __t->omp_clause.code < (int) (CODE1) \
|| (int) __t->omp_clause.code > (int) (CODE2)) \
omp_clause_range_check_failed (__t, __FILE__, __LINE__, \
__FUNCTION__, (CODE1), (CODE2)); \
__t; })
But I cannot find any definition for OMP_CLAUSE_CHECK. Where does GCC define this macro? Thanks.
Amittai
Amittai Aviram
PhD Student in Computer Science
Yale University
646 483 2639
amittai.aviram@xxxxxxxx
http://www.amittai.com
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]