diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-29 12:37:05 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-29 12:37:05 +0000 |
commit | 12cb78d1cca1387a092ec0bd49c250340bff4afc (patch) | |
tree | 1eab97da96906e0a2786d51d9f25f20de02befcf /gcc/fortran/primary.c | |
parent | 31879e18aea3222fe3e56f2c0319c9f230645ff3 (diff) | |
download | gcc-12cb78d1cca1387a092ec0bd49c250340bff4afc.tar.gz |
2012-08-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 190745 using svnmerge, notably
C++ conversion.
[gcc/]
2012-08-29 Basile Starynkevitch <basile@starynkevitch.net>
{{merging with trunk, converted to C++}}
* melt-runtime.h (MELT_FLEXIBLE_DIM): Set when C++.
* melt-runtime.c (melt_tempdir_path): Don't use choose_tmpdir from
libiberty.
(meltgc_start_module_by_index): Use address-of & on VEC_index.
(melt_really_initialize): When printing builtin settings, handle
GCC 4.8 as with implicit ENABLE_BUILD_WITH_CXX.
(meltgc_out_edge): Provide additional flag TDF_DETAILS for dump_edge_info.
(melt_val2passflag): Handle PROP_referenced_vars only when defined.
* melt-module.mk: Use GCCMELT_COMPILER instead of GCCMELT_CC.
* melt-build-script.tpl: Transmit GCCMELT_COMPILER on every make
using melt-module.mk and improve the error message.
* melt-build-script.sh: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@190778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 41e2fa81efb..cadc20c27b7 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "arith.h" @@ -268,7 +269,7 @@ match_hollerith_constant (gfc_expr **result) if (match_integer_constant (&e, 0) == MATCH_YES && gfc_match_char ('h') == MATCH_YES) { - if (gfc_notify_std (GFC_STD_LEGACY, "Extension: Hollerith constant " + if (gfc_notify_std (GFC_STD_LEGACY, "Hollerith constant " "at %C") == FAILURE) goto cleanup; @@ -392,7 +393,7 @@ match_boz_constant (gfc_expr **result) goto backup; if (x_hex - && (gfc_notify_std (GFC_STD_GNU, "Extension: Hexadecimal " + && (gfc_notify_std (GFC_STD_GNU, "Hexadecimal " "constant at %C uses non-standard syntax") == FAILURE)) return MATCH_ERROR; @@ -431,7 +432,7 @@ match_boz_constant (gfc_expr **result) goto backup; } - if (gfc_notify_std (GFC_STD_GNU, "Extension: BOZ constant " + if (gfc_notify_std (GFC_STD_GNU, "BOZ constant " "at %C uses non-standard postfix syntax") == FAILURE) return MATCH_ERROR; @@ -468,7 +469,7 @@ match_boz_constant (gfc_expr **result) } if (!gfc_in_match_data () - && (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: BOZ used outside a DATA " + && (gfc_notify_std (GFC_STD_F2003, "BOZ used outside a DATA " "statement at %C") == FAILURE)) return MATCH_ERROR; @@ -559,7 +560,7 @@ match_real_constant (gfc_expr **result, int signflag) if (c == 'q') { - if (gfc_notify_std (GFC_STD_GNU, "Extension: exponent-letter 'q' in " + if (gfc_notify_std (GFC_STD_GNU, "exponent-letter 'q' in " "real-literal-constant at %C") == FAILURE) return MATCH_ERROR; else if (gfc_option.warn_real_q_constant) @@ -1217,7 +1218,7 @@ match_sym_complex_part (gfc_expr **result) return MATCH_ERROR; } - if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: PARAMETER symbol in " + if (gfc_notify_std (GFC_STD_F2003, "PARAMETER symbol in " "complex constant at %C") == FAILURE) return MATCH_ERROR; @@ -1645,7 +1646,7 @@ match_arg_list_function (gfc_actual_arglist *result) } } - if (gfc_notify_std (GFC_STD_GNU, "Extension: argument list " + if (gfc_notify_std (GFC_STD_GNU, "argument list " "function at %C") == FAILURE) { m = MATCH_ERROR; @@ -1861,7 +1862,7 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, if ((equiv_flag && gfc_peek_ascii_char () == '(') || gfc_peek_ascii_char () == '[' || sym->attr.codimension || (sym->attr.dimension && sym->ts.type != BT_CLASS - && !sym->attr.proc_pointer && !gfc_is_proc_ptr_comp (primary, NULL) + && !sym->attr.proc_pointer && !gfc_is_proc_ptr_comp (primary) && !(gfc_matching_procptr_assignment && sym->attr.flavor == FL_PROCEDURE)) || (sym->ts.type == BT_CLASS && sym->attr.class_ok @@ -2352,7 +2353,7 @@ build_actual_constructor (gfc_structure_ctor_component **comp_head, { if (comp->initializer) { - if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Structure" + if (gfc_notify_std (GFC_STD_F2003, "Structure" " constructor with missing optional arguments" " at %C") == FAILURE) return FAILURE; @@ -2428,7 +2429,7 @@ gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **c } if (actual->name) { - if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Structure" + if (gfc_notify_std (GFC_STD_F2003, "Structure" " constructor with named arguments at %C") == FAILURE) goto cleanup; @@ -2842,13 +2843,18 @@ gfc_match_rvalue (gfc_expr **result) /* Parse functions returning a procptr. */ goto function0; - if (gfc_is_intrinsic (sym, 0, gfc_current_locus) - || gfc_is_intrinsic (sym, 1, gfc_current_locus)) - sym->attr.intrinsic = 1; e = gfc_get_expr (); e->expr_type = EXPR_VARIABLE; e->symtree = symtree; m = gfc_match_varspec (e, 0, false, true); + if (!e->ref && sym->attr.flavor == FL_UNKNOWN + && sym->ts.type == BT_UNKNOWN + && gfc_add_flavor (&sym->attr, FL_PROCEDURE, + sym->name, NULL) == FAILURE) + { + m = MATCH_ERROR; + break; + } break; } |