Commit 9aa433c2 by Kaveh R. Ghazi Committed by Kaveh Ghazi

gfortran.h (protected): Remove macro.

	* gfortran.h (protected): Remove macro.
	* dump-parse-tree.c (show_attr): Avoid C++ keywords.
	* expr.c (gfc_check_pointer_assign): Likewise.
	* interface.c (compare_parameter_protected): Likewise.
	* intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
	add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
	add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
	add_sym_5s): Likewise.
	* match.c (gfc_match_assignment, gfc_match_pointer_assignment):
	Likewise.
	* module.c (mio_symbol_attribute): Likewise.
	* primary.c (match_variable): Likewise.
	* resolve.c (resolve_equivalence): Likewise.
	* symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
	Likewise.
	* trans-types.c (gfc_get_array_type_bounds): Likewise.

From-SVN: r137980
parent ea471af0
2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gfortran.h (protected): Remove macro.
* dump-parse-tree.c (show_attr): Avoid C++ keywords.
* expr.c (gfc_check_pointer_assign): Likewise.
* interface.c (compare_parameter_protected): Likewise.
* intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
add_sym_5s): Likewise.
* match.c (gfc_match_assignment, gfc_match_pointer_assignment):
Likewise.
* module.c (mio_symbol_attribute): Likewise.
* primary.c (match_variable): Likewise.
* resolve.c (resolve_equivalence): Likewise.
* symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
Likewise.
* trans-types.c (gfc_get_array_type_bounds): Likewise.
2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* arith.c (eval_type_intrinsic0): Avoid C++ keywords. * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
......
...@@ -570,7 +570,7 @@ show_attr (symbol_attribute *attr) ...@@ -570,7 +570,7 @@ show_attr (symbol_attribute *attr)
fputs (" OPTIONAL", dumpfile); fputs (" OPTIONAL", dumpfile);
if (attr->pointer) if (attr->pointer)
fputs (" POINTER", dumpfile); fputs (" POINTER", dumpfile);
if (attr->protected) if (attr->is_protected)
fputs (" PROTECTED", dumpfile); fputs (" PROTECTED", dumpfile);
if (attr->value) if (attr->value)
fputs (" VALUE", dumpfile); fputs (" VALUE", dumpfile);
......
...@@ -3000,7 +3000,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) ...@@ -3000,7 +3000,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue)
return FAILURE; return FAILURE;
} }
if (attr.protected && attr.use_assoc) if (attr.is_protected && attr.use_assoc)
{ {
gfc_error ("Pointer assigment target has PROTECTED " gfc_error ("Pointer assigment target has PROTECTED "
"attribute at %L", &rvalue->where); "attribute at %L", &rvalue->where);
......
...@@ -627,8 +627,6 @@ typedef struct ...@@ -627,8 +627,6 @@ typedef struct
ENUM_BITFIELD (save_state) save:2; ENUM_BITFIELD (save_state) save:2;
unsigned data:1, /* Symbol is named in a DATA statement. */ unsigned data:1, /* Symbol is named in a DATA statement. */
/* FIXME: This macro is temporary until we convert everything. */
#define protected is_protected
is_protected:1, /* Symbol has been marked as protected. */ is_protected:1, /* Symbol has been marked as protected. */
use_assoc:1, /* Symbol has been use-associated. */ use_assoc:1, /* Symbol has been use-associated. */
use_only:1, /* Symbol has been use-associated, with ONLY. */ use_only:1, /* Symbol has been use-associated, with ONLY. */
......
...@@ -1565,7 +1565,7 @@ compare_parameter_protected (gfc_symbol *formal, gfc_expr *actual) ...@@ -1565,7 +1565,7 @@ compare_parameter_protected (gfc_symbol *formal, gfc_expr *actual)
if (actual->expr_type != EXPR_VARIABLE) if (actual->expr_type != EXPR_VARIABLE)
return 1; return 1;
if (!actual->symtree->n.sym->attr.protected) if (!actual->symtree->n.sym->attr.is_protected)
return 1; return 1;
if (!actual->symtree->n.sym->attr.use_assoc) if (!actual->symtree->n.sym->attr.use_assoc)
......
...@@ -48,7 +48,7 @@ static enum ...@@ -48,7 +48,7 @@ static enum
{ SZ_NOTHING = 0, SZ_SUBS, SZ_FUNCS, SZ_CONVS } { SZ_NOTHING = 0, SZ_SUBS, SZ_FUNCS, SZ_CONVS }
sizing; sizing;
enum class enum klass
{ NO_CLASS = 0, CLASS_ELEMENTAL, CLASS_INQUIRY, CLASS_TRANSFORMATIONAL }; { NO_CLASS = 0, CLASS_ELEMENTAL, CLASS_INQUIRY, CLASS_TRANSFORMATIONAL };
#define ACTUAL_NO 0 #define ACTUAL_NO 0
...@@ -243,7 +243,7 @@ do_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg) ...@@ -243,7 +243,7 @@ do_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg)
ZABS ZCOS ZEXP ZLOG ZSIN ZSQRT. */ ZABS ZCOS ZEXP ZLOG ZSIN ZSQRT. */
static void static void
add_sym (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, int kind, add_sym (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type, int kind,
int standard, gfc_check_f check, gfc_simplify_f simplify, int standard, gfc_check_f check, gfc_simplify_f simplify,
gfc_resolve_f resolve, ...) gfc_resolve_f resolve, ...)
{ {
...@@ -332,7 +332,7 @@ add_sym (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type ...@@ -332,7 +332,7 @@ add_sym (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type
0 arguments. */ 0 arguments. */
static void static void
add_sym_0 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_0 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (void), try (*check) (void),
gfc_expr *(*simplify) (void), gfc_expr *(*simplify) (void),
...@@ -374,7 +374,7 @@ add_sym_0s (const char *name, gfc_isym_id id, int standard, void (*resolve) (gfc ...@@ -374,7 +374,7 @@ add_sym_0s (const char *name, gfc_isym_id id, int standard, void (*resolve) (gfc
1 arguments. */ 1 arguments. */
static void static void
add_sym_1 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_1 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (gfc_expr *), try (*check) (gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *), gfc_expr *(*simplify) (gfc_expr *),
...@@ -399,7 +399,7 @@ add_sym_1 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty ...@@ -399,7 +399,7 @@ add_sym_1 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty
1 arguments. */ 1 arguments. */
static void static void
add_sym_1s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, int standard, add_sym_1s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *), try (*check) (gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *), gfc_expr *(*simplify) (gfc_expr *),
void (*resolve) (gfc_code *), void (*resolve) (gfc_code *),
...@@ -423,7 +423,7 @@ add_sym_1s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, ...@@ -423,7 +423,7 @@ add_sym_1s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind,
function. MAX et al take 2 or more arguments. */ function. MAX et al take 2 or more arguments. */
static void static void
add_sym_1m (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_1m (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (gfc_actual_arglist *), try (*check) (gfc_actual_arglist *),
gfc_expr *(*simplify) (gfc_expr *), gfc_expr *(*simplify) (gfc_expr *),
...@@ -450,7 +450,7 @@ add_sym_1m (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt t ...@@ -450,7 +450,7 @@ add_sym_1m (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt t
2 arguments. */ 2 arguments. */
static void static void
add_sym_2 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_2 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *), try (*check) (gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *), gfc_expr *(*simplify) (gfc_expr *, gfc_expr *),
...@@ -477,7 +477,7 @@ add_sym_2 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty ...@@ -477,7 +477,7 @@ add_sym_2 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty
2 arguments. */ 2 arguments. */
static void static void
add_sym_2s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, int standard, add_sym_2s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *), try (*check) (gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *), gfc_expr *(*simplify) (gfc_expr *, gfc_expr *),
void (*resolve) (gfc_code *), void (*resolve) (gfc_code *),
...@@ -503,7 +503,7 @@ add_sym_2s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, ...@@ -503,7 +503,7 @@ add_sym_2s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind,
3 arguments. */ 3 arguments. */
static void static void
add_sym_3 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_3 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *), try (*check) (gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *), gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
...@@ -532,7 +532,7 @@ add_sym_3 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty ...@@ -532,7 +532,7 @@ add_sym_3 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty
might have to be reordered. */ might have to be reordered. */
static void static void
add_sym_3ml (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_3ml (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (gfc_actual_arglist *), try (*check) (gfc_actual_arglist *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *), gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
...@@ -561,7 +561,7 @@ add_sym_3ml (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ...@@ -561,7 +561,7 @@ add_sym_3ml (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt
their argument also might have to be reordered. */ their argument also might have to be reordered. */
static void static void
add_sym_3red (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_3red (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (gfc_actual_arglist *), try (*check) (gfc_actual_arglist *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *), gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
...@@ -590,7 +590,7 @@ add_sym_3red (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ...@@ -590,7 +590,7 @@ add_sym_3red (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt
3 arguments. */ 3 arguments. */
static void static void
add_sym_3s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, int standard, add_sym_3s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *), try (*check) (gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *), gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
void (*resolve) (gfc_code *), void (*resolve) (gfc_code *),
...@@ -618,7 +618,7 @@ add_sym_3s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, ...@@ -618,7 +618,7 @@ add_sym_3s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind,
4 arguments. */ 4 arguments. */
static void static void
add_sym_4 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt type, add_sym_4 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *), try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
...@@ -651,7 +651,7 @@ add_sym_4 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty ...@@ -651,7 +651,7 @@ add_sym_4 (const char *name, gfc_isym_id id, enum class cl, int actual_ok, bt ty
4 arguments. */ 4 arguments. */
static void static void
add_sym_4s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, int standard, add_sym_4s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *), try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *), gfc_expr *),
...@@ -682,7 +682,7 @@ add_sym_4s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, ...@@ -682,7 +682,7 @@ add_sym_4s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind,
5 arguments. */ 5 arguments. */
static void static void
add_sym_5s (const char *name, gfc_isym_id id, enum class cl, bt type, int kind, int standard, add_sym_5s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *), gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
......
...@@ -1287,7 +1287,7 @@ gfc_match_assignment (void) ...@@ -1287,7 +1287,7 @@ gfc_match_assignment (void)
return MATCH_NO; return MATCH_NO;
} }
if (lvalue->symtree->n.sym->attr.protected if (lvalue->symtree->n.sym->attr.is_protected
&& lvalue->symtree->n.sym->attr.use_assoc) && lvalue->symtree->n.sym->attr.use_assoc)
{ {
gfc_current_locus = old_loc; gfc_current_locus = old_loc;
...@@ -1347,7 +1347,7 @@ gfc_match_pointer_assignment (void) ...@@ -1347,7 +1347,7 @@ gfc_match_pointer_assignment (void)
if (m != MATCH_YES) if (m != MATCH_YES)
goto cleanup; goto cleanup;
if (lvalue->symtree->n.sym->attr.protected if (lvalue->symtree->n.sym->attr.is_protected
&& lvalue->symtree->n.sym->attr.use_assoc) && lvalue->symtree->n.sym->attr.use_assoc)
{ {
gfc_error ("Assigning to a PROTECTED pointer at %C"); gfc_error ("Assigning to a PROTECTED pointer at %C");
......
...@@ -1741,7 +1741,7 @@ mio_symbol_attribute (symbol_attribute *attr) ...@@ -1741,7 +1741,7 @@ mio_symbol_attribute (symbol_attribute *attr)
MIO_NAME (ab_attribute) (AB_OPTIONAL, attr_bits); MIO_NAME (ab_attribute) (AB_OPTIONAL, attr_bits);
if (attr->pointer) if (attr->pointer)
MIO_NAME (ab_attribute) (AB_POINTER, attr_bits); MIO_NAME (ab_attribute) (AB_POINTER, attr_bits);
if (attr->protected) if (attr->is_protected)
MIO_NAME (ab_attribute) (AB_PROTECTED, attr_bits); MIO_NAME (ab_attribute) (AB_PROTECTED, attr_bits);
if (attr->value) if (attr->value)
MIO_NAME (ab_attribute) (AB_VALUE, attr_bits); MIO_NAME (ab_attribute) (AB_VALUE, attr_bits);
...@@ -1836,7 +1836,7 @@ mio_symbol_attribute (symbol_attribute *attr) ...@@ -1836,7 +1836,7 @@ mio_symbol_attribute (symbol_attribute *attr)
attr->pointer = 1; attr->pointer = 1;
break; break;
case AB_PROTECTED: case AB_PROTECTED:
attr->protected = 1; attr->is_protected = 1;
break; break;
case AB_VALUE: case AB_VALUE:
attr->value = 1; attr->value = 1;
......
...@@ -2739,7 +2739,7 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag) ...@@ -2739,7 +2739,7 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag)
switch (sym->attr.flavor) switch (sym->attr.flavor)
{ {
case FL_VARIABLE: case FL_VARIABLE:
if (sym->attr.protected && sym->attr.use_assoc) if (sym->attr.is_protected && sym->attr.use_assoc)
{ {
gfc_error ("Assigning to PROTECTED variable at %C"); gfc_error ("Assigning to PROTECTED variable at %C");
return MATCH_ERROR; return MATCH_ERROR;
......
...@@ -8962,7 +8962,7 @@ resolve_equivalence (gfc_equiv *eq) ...@@ -8962,7 +8962,7 @@ resolve_equivalence (gfc_equiv *eq)
sym = e->symtree->n.sym; sym = e->symtree->n.sym;
if (sym->attr.protected) if (sym->attr.is_protected)
cnt_protected++; cnt_protected++;
if (cnt_protected > 0 && cnt_protected != object) if (cnt_protected > 0 && cnt_protected != object)
{ {
......
...@@ -344,14 +344,14 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) ...@@ -344,14 +344,14 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
*intent_in = "INTENT(IN)", *intrinsic = "INTRINSIC", *intent_in = "INTENT(IN)", *intrinsic = "INTRINSIC",
*intent_out = "INTENT(OUT)", *intent_inout = "INTENT(INOUT)", *intent_out = "INTENT(OUT)", *intent_inout = "INTENT(INOUT)",
*allocatable = "ALLOCATABLE", *elemental = "ELEMENTAL", *allocatable = "ALLOCATABLE", *elemental = "ELEMENTAL",
*private = "PRIVATE", *recursive = "RECURSIVE", *privat = "PRIVATE", *recursive = "RECURSIVE",
*in_common = "COMMON", *result = "RESULT", *in_namelist = "NAMELIST", *in_common = "COMMON", *result = "RESULT", *in_namelist = "NAMELIST",
*public = "PUBLIC", *optional = "OPTIONAL", *entry = "ENTRY", *publik = "PUBLIC", *optional = "OPTIONAL", *entry = "ENTRY",
*function = "FUNCTION", *subroutine = "SUBROUTINE", *function = "FUNCTION", *subroutine = "SUBROUTINE",
*dimension = "DIMENSION", *in_equivalence = "EQUIVALENCE", *dimension = "DIMENSION", *in_equivalence = "EQUIVALENCE",
*use_assoc = "USE ASSOCIATED", *cray_pointer = "CRAY POINTER", *use_assoc = "USE ASSOCIATED", *cray_pointer = "CRAY POINTER",
*cray_pointee = "CRAY POINTEE", *data = "DATA", *value = "VALUE", *cray_pointee = "CRAY POINTEE", *data = "DATA", *value = "VALUE",
*volatile_ = "VOLATILE", *protected = "PROTECTED", *volatile_ = "VOLATILE", *is_protected = "PROTECTED",
*is_bind_c = "BIND(C)", *procedure = "PROCEDURE"; *is_bind_c = "BIND(C)", *procedure = "PROCEDURE";
static const char *threadprivate = "THREADPRIVATE"; static const char *threadprivate = "THREADPRIVATE";
...@@ -383,9 +383,9 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) ...@@ -383,9 +383,9 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
if (attr->optional) if (attr->optional)
a1 = optional; a1 = optional;
if (attr->access == ACCESS_PRIVATE) if (attr->access == ACCESS_PRIVATE)
a1 = private; a1 = privat;
if (attr->access == ACCESS_PUBLIC) if (attr->access == ACCESS_PUBLIC)
a1 = public; a1 = publik;
if (attr->intent != INTENT_UNKNOWN) if (attr->intent != INTENT_UNKNOWN)
a1 = intent; a1 = intent;
...@@ -541,9 +541,9 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) ...@@ -541,9 +541,9 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
goto conflict; goto conflict;
} }
conf (protected, intrinsic) conf (is_protected, intrinsic)
conf (protected, external) conf (is_protected, external)
conf (protected, in_common) conf (is_protected, in_common)
conf (volatile_, intrinsic) conf (volatile_, intrinsic)
conf (volatile_, external) conf (volatile_, external)
...@@ -558,7 +558,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) ...@@ -558,7 +558,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf (procedure, allocatable) conf (procedure, allocatable)
conf (procedure, dimension) conf (procedure, dimension)
conf (procedure, intrinsic) conf (procedure, intrinsic)
conf (procedure, protected) conf (procedure, is_protected)
conf (procedure, target) conf (procedure, target)
conf (procedure, value) conf (procedure, value)
conf (procedure, volatile_) conf (procedure, volatile_)
...@@ -585,7 +585,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) ...@@ -585,7 +585,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf2 (dummy); conf2 (dummy);
conf2 (volatile_); conf2 (volatile_);
conf2 (pointer); conf2 (pointer);
conf2 (protected); conf2 (is_protected);
conf2 (target); conf2 (target);
conf2 (external); conf2 (external);
conf2 (intrinsic); conf2 (intrinsic);
...@@ -599,7 +599,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) ...@@ -599,7 +599,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
if (attr->access == ACCESS_PUBLIC || attr->access == ACCESS_PRIVATE) if (attr->access == ACCESS_PUBLIC || attr->access == ACCESS_PRIVATE)
{ {
a2 = attr->access == ACCESS_PUBLIC ? public : private; a2 = attr->access == ACCESS_PUBLIC ? publik : privat;
gfc_error ("%s attribute applied to %s %s at %L", a2, a1, gfc_error ("%s attribute applied to %s %s at %L", a2, a1,
name, where); name, where);
return FAILURE; return FAILURE;
...@@ -684,7 +684,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) ...@@ -684,7 +684,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf2 (subroutine); conf2 (subroutine);
conf2 (entry); conf2 (entry);
conf2 (pointer); conf2 (pointer);
conf2 (protected); conf2 (is_protected);
conf2 (target); conf2 (target);
conf2 (dummy); conf2 (dummy);
conf2 (in_common); conf2 (in_common);
...@@ -976,7 +976,7 @@ gfc_add_protected (symbol_attribute *attr, const char *name, locus *where) ...@@ -976,7 +976,7 @@ gfc_add_protected (symbol_attribute *attr, const char *name, locus *where)
if (check_used (attr, name, where)) if (check_used (attr, name, where))
return FAILURE; return FAILURE;
if (attr->protected) if (attr->is_protected)
{ {
if (gfc_notify_std (GFC_STD_LEGACY, if (gfc_notify_std (GFC_STD_LEGACY,
"Duplicate PROTECTED attribute specified at %L", "Duplicate PROTECTED attribute specified at %L",
...@@ -985,7 +985,7 @@ gfc_add_protected (symbol_attribute *attr, const char *name, locus *where) ...@@ -985,7 +985,7 @@ gfc_add_protected (symbol_attribute *attr, const char *name, locus *where)
return FAILURE; return FAILURE;
} }
attr->protected = 1; attr->is_protected = 1;
return check_conflict (attr, name, where); return check_conflict (attr, name, where);
} }
...@@ -1582,7 +1582,7 @@ gfc_copy_attr (symbol_attribute *dest, symbol_attribute *src, locus *where) ...@@ -1582,7 +1582,7 @@ gfc_copy_attr (symbol_attribute *dest, symbol_attribute *src, locus *where)
goto fail; goto fail;
if (src->pointer && gfc_add_pointer (dest, where) == FAILURE) if (src->pointer && gfc_add_pointer (dest, where) == FAILURE)
goto fail; goto fail;
if (src->protected && gfc_add_protected (dest, NULL, where) == FAILURE) if (src->is_protected && gfc_add_protected (dest, NULL, where) == FAILURE)
goto fail; goto fail;
if (src->save && gfc_add_save (dest, NULL, where) == FAILURE) if (src->save && gfc_add_save (dest, NULL, where) == FAILURE)
goto fail; goto fail;
......
...@@ -1513,7 +1513,7 @@ gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound, ...@@ -1513,7 +1513,7 @@ gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound,
{ {
char name[8 + GFC_RANK_DIGITS + GFC_MAX_SYMBOL_LEN]; char name[8 + GFC_RANK_DIGITS + GFC_MAX_SYMBOL_LEN];
tree fat_type, base_type, arraytype, lower, upper, stride, tmp, rtype; tree fat_type, base_type, arraytype, lower, upper, stride, tmp, rtype;
const char *typename; const char *type_name;
int n; int n;
base_type = gfc_get_array_descriptor_base (dimen); base_type = gfc_get_array_descriptor_base (dimen);
...@@ -1523,11 +1523,11 @@ gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound, ...@@ -1523,11 +1523,11 @@ gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound,
if (tmp && TREE_CODE (tmp) == TYPE_DECL) if (tmp && TREE_CODE (tmp) == TYPE_DECL)
tmp = DECL_NAME (tmp); tmp = DECL_NAME (tmp);
if (tmp) if (tmp)
typename = IDENTIFIER_POINTER (tmp); type_name = IDENTIFIER_POINTER (tmp);
else else
typename = "unknown"; type_name = "unknown";
sprintf (name, "array" GFC_RANK_PRINTF_FORMAT "_%.*s", dimen, sprintf (name, "array" GFC_RANK_PRINTF_FORMAT "_%.*s", dimen,
GFC_MAX_SYMBOL_LEN, typename); GFC_MAX_SYMBOL_LEN, type_name);
TYPE_NAME (fat_type) = get_identifier (name); TYPE_NAME (fat_type) = get_identifier (name);
GFC_DESCRIPTOR_TYPE_P (fat_type) = 1; GFC_DESCRIPTOR_TYPE_P (fat_type) = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment