2009-08-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/40011 * error.c : Add static flag 'warnings_not_errors'. (gfc_error): If 'warnings_not_errors' is set, branch to code from gfc_warning. (gfc_clear_error): Reset 'warnings_not_errors'. (gfc_errors_to_warnings): New function. * options.c (gfc_post_options): If pedantic and flag_whole_file change the latter to a value of 2. * parse.c (parse_module): Add module namespace to gsymbol. (resolve_all_program_units): New function. (clean_up_modules): New function. (translate_all_program_units): New function. (gfc_parse_file): If whole_file, do not clean up module right away and add derived types to namespace derived types. In addition, call the three new functions above. * resolve.c (not_in_recursive): New function. (not_entry_self_reference): New function. (resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN, procedure must not be in the course of being resolved and must return false for the two new functions. Pack away the current derived type list before calling gfc_resolve for the gsymbol namespace. It is unconditionally an error if the ranks of the reference and ther procedure do not match. Convert errors to warnings during call to gfc_procedure_use if not pedantic or legacy. (gfc_resolve): Set namespace resolved flag to -1 during resolution and store current cs_base. * trans-decl.c (gfc_get_symbol_decl): If whole_file compilation substitute a use associated variable, if it is available in a gsymbolnamespace. (gfc_get_extern_function_decl): If the procedure is use assoc, do not attempt to find it in a gsymbol because it could be an interface. If the symbol exists in a module namespace, return its backend_decl. * trans-expr.c (gfc_trans_scalar_assign): If a derived type assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs. * trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a boolean argument. Copy component backend_decls directly if the components are derived types and from_gsym is true. (gfc_get_derived_type): If whole_file copy the derived type from the module if it is use associated, otherwise, if can be found in another gsymbol namespace, use the existing derived type as the TYPE_CANONICAL and build normally. * gfortran.h : Add derived_types and resolved fields to gfc_namespace. Include prototype for gfc_errors_to_warnings. 2009-08-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/40011 * gfortran.dg/whole_file_7.f90: New test. * gfortran.dg/whole_file_8.f90: New test. * gfortran.dg/whole_file_9.f90: New test. * gfortran.dg/whole_file_10.f90: New test. * gfortran.dg/whole_file_11.f90: New test. * gfortran.dg/whole_file_12.f90: New test. * gfortran.dg/whole_file_13.f90: New test. * gfortran.dg/whole_file_14.f90: New test. From-SVN: r150333
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
ChangeLog-2002 | Loading commit data... | |
ChangeLog-2003 | Loading commit data... | |
ChangeLog-2004 | Loading commit data... | |
ChangeLog-2005 | Loading commit data... | |
ChangeLog-2006 | Loading commit data... | |
ChangeLog-2007 | Loading commit data... | |
ChangeLog-2008 | Loading commit data... | |
ChangeLog.ptr | Loading commit data... | |
Make-lang.in | Loading commit data... | |
arith.c | Loading commit data... | |
arith.h | Loading commit data... | |
array.c | Loading commit data... | |
bbt.c | Loading commit data... | |
check.c | Loading commit data... | |
config-lang.in | Loading commit data... | |
convert.c | Loading commit data... | |
cpp.c | Loading commit data... | |
cpp.h | Loading commit data... | |
data.c | Loading commit data... | |
data.h | Loading commit data... | |
decl.c | Loading commit data... | |
dependency.c | Loading commit data... | |
dependency.h | Loading commit data... | |
dump-parse-tree.c | Loading commit data... | |
error.c | Loading commit data... | |
expr.c | Loading commit data... | |
f95-lang.c | Loading commit data... | |
gfc-internals.texi | Loading commit data... | |
gfortran.h | Loading commit data... | |
gfortran.texi | Loading commit data... | |
gfortranspec.c | Loading commit data... | |
interface.c | Loading commit data... | |
intrinsic.c | Loading commit data... | |
intrinsic.h | Loading commit data... | |
intrinsic.texi | Loading commit data... | |
invoke.texi | Loading commit data... | |
io.c | Loading commit data... | |
ioparm.def | Loading commit data... | |
iresolve.c | Loading commit data... | |
iso-c-binding.def | Loading commit data... | |
iso-fortran-env.def | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lang.opt | Loading commit data... | |
libgfortran.h | Loading commit data... | |
match.c | Loading commit data... | |
match.h | Loading commit data... | |
matchexp.c | Loading commit data... | |
mathbuiltins.def | Loading commit data... | |
misc.c | Loading commit data... | |
module.c | Loading commit data... | |
openmp.c | Loading commit data... | |
options.c | Loading commit data... | |
parse.c | Loading commit data... | |
parse.h | Loading commit data... | |
primary.c | Loading commit data... | |
resolve.c | Loading commit data... | |
scanner.c | Loading commit data... | |
simplify.c | Loading commit data... | |
st.c | Loading commit data... | |
symbol.c | Loading commit data... | |
target-memory.c | Loading commit data... | |
target-memory.h | Loading commit data... | |
trans-array.c | Loading commit data... | |
trans-array.h | Loading commit data... | |
trans-common.c | Loading commit data... | |
trans-const.c | Loading commit data... | |
trans-const.h | Loading commit data... | |
trans-decl.c | Loading commit data... | |
trans-expr.c | Loading commit data... | |
trans-intrinsic.c | Loading commit data... | |
trans-io.c | Loading commit data... | |
trans-openmp.c | Loading commit data... | |
trans-stmt.c | Loading commit data... | |
trans-stmt.h | Loading commit data... | |
trans-types.c | Loading commit data... | |
trans-types.h | Loading commit data... | |
trans.c | Loading commit data... | |
trans.h | Loading commit data... | |
types.def | Loading commit data... |