2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
PR middle-end/42130
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
translate_clast_for_loop): New.
(translate_clast_for): Add a condition around the loop, to do not
execute loops with zero iterations.
* testsuite/g++.dg/graphite/pr42130.C: New.
* testsuite/gcc.dg/graphite/pr35356-2.c: Adapt.
From-SVN: r154849
2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite-clast-to-gimple.c (translate_clast_user,
translate_clast_for, translate_clast_guard): Simplify and move common
elements to translate_clast().
(translate_clast): Simplify and get common elements.
From-SVN: r154847
CLooG automatically frees the names list, so sharing SESE_PARAMS_NAMES
between gloog() and debug_generated_program() leads to freeing them
twice. As both SESE_PARAM_NAMES and SESE_PARAMS_INDEX are code
generation data structures remove them and the functions working on them
from sese.h and put them in clast-to-gimple.
2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
clast_name_to_index, save_clast_name_index, debug_clast_name_index,
debug_clast_name_indexes_1, debug_clast_name_indexes,
clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
(clast_name_to_gcc, clast_to_gcc_expression,
clast_to_gcc_expression_red, gcc_type_for_clast_expr,
gcc_type_for_clast_eq, graphite_translate_clast_equation,
graphite_create_guard_cond_expr, graphite_create_new_loop,
translate_clast): Add params_index.
(initialize_cloog_names): Create parameter strings from scratch, do
not reference other strings.
(create_params_index): New.
(gloog): Initialize params_index.
* graphite-scop-detection (free_scops_1): Removed.
(limit_scops): Use normal free_scops.
* graphite-sese-to-poly.c (save_var_names): Removed.
(parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
and SESE_PARAMS_INDEX.
* sese.c (new_sese, free_sese): Dito.
* sese.h (struct sese): Remove params_index, params_names.
(SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
From-SVN: r154844
2009-11-30 Steve Ellcey <sje@cup.hp.com>
Jakub Jelinek <jakub@redhat.com>
* function.c (instantiate_virtual_regs_in_insn): Copy to new reg
before forcing mode.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r154843
merge from fortran-dev branch:
gcc/fortran/
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/42053
* resolve.c (resolve_select_type): Check for duplicate CLASS IS blocks.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/41631
* decl.c (gfc_match_derived_decl): Set extension level.
* gfortran.h (symbol_attribute): Expand 'extension' bit field to 8 bit.
* iresolve.c (gfc_resolve_extends_type_of): Return value of
'is_extension_of' has kind=4.
* match.c (select_type_set_tmp,gfc_match_class_is): Create temporary
for CLASS IS blocks.
* module.c (MOD_VERSION): Bump module version.
(ab_attribute,attr_bits): Remove AB_EXTENSION.
(mio_symbol_attribute): Handle expanded 'extension' field.
* resolve.c (resolve_select_type): Implement CLASS IS blocks.
(resolve_fl_variable_derived): Show correct type name.
* symbol.c (gfc_build_class_symbol): Set extension level.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
* intrinsic.h (gfc_resolve_extends_type_of): Add prototype.
* intrinsic.c (add_functions): Use 'gfc_resolve_extends_type_of'.
* iresolve.c (gfc_resolve_extends_type_of): New function, which
replaces the call to EXTENDS_TYPE_OF by the library function
'is_extension_of' and modifies the arguments.
* trans-intrinsic.c (gfc_conv_extends_type_of): Removed.
(gfc_conv_intrinsic_function): FOR EXTENDS_TYPE_OF, don't call
gfc_conv_extends_type_of but gfc_conv_intrinsic_funcall.
2009-11-30 Paul Thomas <pault@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
* decl.c (encapsulate_class_symbol): Replaced by
'gfc_build_class_symbol'.
(build_sym,build_struct): Call 'gfc_build_class_symbol'.
(gfc_match_derived_decl): Replace vindex by hash_value.
* dump-parse-tree.c (show_symbol): Replace vindex by hash_value.
* gfortran.h (symbol_attribute): Add field 'vtab'.
(gfc_symbol): Replace vindex by hash_value.
(gfc_class_esym_list): Ditto.
(gfc_get_derived_type,gfc_build_class_symbol,gfc_find_derived_vtab):
New prototypes.
* module.c (mio_symbol): Replace vindex by hash_value.
* resolve.c (vindex_expr): Rename to 'hash_value_expr'.
(resolve_class_compcall,resolve_class_typebound_call): Renamed
'vindex_expr'.
(resolve_select_type): Replace $vindex by $vptr->$hash.
* symbol.c (gfc_add_save): Handle vtab symbols.
(gfc_type_compatible): Rewrite.
(gfc_build_class_symbol): New function which replaces
'encapsulate_class_symbol'.
(gfc_find_derived_vtab): New function to set up a vtab symbol for a
derived type.
* trans-decl.c (gfc_create_module_variable): Handle vtab symbols.
* trans-expr.c (select_class_proc): Replace vindex by hash_value.
(gfc_conv_derived_to_class): New function to construct a temporary
CLASS variable from a derived type expression.
(gfc_conv_procedure_call): Call 'gfc_conv_derived_to_class'.
(gfc_conv_structure): Initialize the $extends and $size fields of
vtab symbols.
(gfc_trans_class_assign): Replace $vindex by $vptr. Remove the $size
assignment.
* trans-intrinsic.c (gfc_conv_same_type_as): Replace $vindex by
$vptr->$hash, and replace vindex by hash_value.
* trans-stmt.c (gfc_trans_allocate): Insert $vptr references, replace
$vindex by $vptr. Remove the $size assignment.
* trans-types.c (gfc_get_derived_type): Make it non-static.
gcc/testsuite/
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/42053
* gfortran.dg/select_type_9.f03: New.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/41631
* gfortran.dg/extends_type_of_1.f03: Fix invalid test case.
* gfortran.dg/module_md5_1.f90: Adjusted MD5 sum.
* gfortran.dg/select_type_1.f03: Remove FIXMEs.
* gfortran.dg/select_type_2.f03: Ditto.
* gfortran.dg/select_type_8.f03: New test.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
* gfortran.dg/extends_type_of_1.f03: New test.
* gfortran.dg/same_type_as_1.f03: Extended.
2009-11-30 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/class_4c.f03: Add dg-additional-sources.
* gfortran.dg/class_4d.f03: Rename module. Cleanup modules.
libgfortran/
2009-11-30 Janus Weil <janus@gcc.gnu.org>
* gfortran.map: Add _gfortran_is_extension_of.
* Makefile.am: Add intrinsics/extends_type_of.c.
* Makefile.in: Regenerated.
* intrinsics/extends_type_of.c: New file.
From-SVN: r154840
2009-11-30 Martin Jambor <mjambor@suse.cz>
PR middle-end/42196
* tree-sra.c (struct access): New field grp_different_types.
(dump_access): Dump grp_different_types.
(compare_access_positions): Prefer scalars and vectors over other
scalar types.
(sort_and_splice_var_accesses): Set grp_different_types if appropriate.
(sra_modify_expr): Use the original also when dealing with a complex
or vector group accessed as multiple types.
* testsuite/gcc.c-torture/compile/pr42196-1.c: New test.
* testsuite/gcc.c-torture/compile/pr42196-2.c: New test.
* testsuite/gcc.c-torture/compile/pr42196-3.c: New test.
From-SVN: r154834
* config/i386/i386-builtin-types.def (V4DF_FTYPE_V4DF_V4DF_V4DI): New.
(V8SF_FTYPE_V8SF_V8SF_V8SI): New.
* config/i386/i386.c (ix86_vectorize_builtin_vec_perm): Support
V4DF and V8SF for AVX; relax constraint on V4SF to SSE1 from SSE2.
(IX86_BUILTIN_VEC_PERM_V4DF, IX86_BUILTIN_VEC_PERM_V8SF): New.
(bdesc_args): Add them.
(ix86_expand_builtin): Expand them.
(expand_vec_perm_pshufb2): Only operate on 16-byte vectors.
From-SVN: r154831
2009-11-30 Vasiliy Fofanov <fofanov@adacore.com>
* vms_data.ads: Add new VMS qualifiers,
REVERSE_BIT_ORDER/NOREVERSE_BIT_ORDER, to support warnings on bit order
effects.
2009-11-30 Thomas Quinot <quinot@adacore.com>
* exp_ch9.adb, exp_ch9.ads, sem_util.ads: Minor reformatting.
2009-11-30 Gary Dismukes <dismukes@adacore.com>
* sem_prag.adb: Fix spelling error.
From-SVN: r154829
2009-11-30 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.ads (Build_Private_Protected_Declaration): For a protected
operation that is only declared in a protected body, create a
corresponding subprogram declaration.
* exp_ch9.adb (Expand_N_Protected_Body): Create protected body of
operation in all cases, including for an operation that is only
declared in the body.
* sem_ch6.adb: Call Build_Private_Protected_Declaration
* exp_ch6.adb (Expand_N_Subprogram_Declaration): For an operation
declared in a protected body, create the declaration for the
corresponding protected version of the operation.
2009-11-30 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Disable specific expansions
for Restrictions pragmas, to avoid tree inconsistencies between
compilations with different pragmas.
2009-11-30 Jerome Lambourg <lambourg@adacore.com>
* sem_prag.adb (Check_Duplicated_Export_Name): Allow entities exported
to CIL to have duplicated export name.
From-SVN: r154828
2009-11-30 Ed Schonberg <schonberg@adacore.com>
* par_sco.adb (Traverse_Handled_Statement_Sequence): Do not emit SCO's
for null statements that do not come from source.
* sinfo.ads: Clarify documentation of Comes_From_Source
2009-11-30 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Add_Source): Use Display_Name for both projects when
displaying the paths in error message.
2009-11-30 Emmanuel Briot <briot@adacore.com>
* adaint.h, adaint.c (file_attributes): force the use of unsigned char.
On some platforms, "char" is signed, on others unsigned, so we
explicitly specify the one we expect
From-SVN: r154826
2009-11-30 Matthew Heaney <heaney@adacore.com>
* a-coinve.adb (Insert): Move exception handler closer to point where
exception can occur.
Minor reformatting & comment additions.
2009-11-30 Arnaud Charlet <charlet@adacore.com>
* freeze.adb (Freeze_Entity): Disable warning on 'Foreign caller must
pass bounds' for VM targets, not relevant.
2009-11-30 Robert Dewar <dewar@adacore.com>
* sem_util.adb (Wrong_Type): Diagnose additional case of modular
missing parens.
* a-tiinio.adb, a-wtinio.adb, a-ztinio.adb: Minor reformatting
* exp_util.adb (Kill_Dead_Code): Suppress warning for some additional
cases.
* sem_warn.adb (Set_Warning_Flag): Clean up gnatwA list and ensure
completeness.
(Set_Dot_Warning_Flag): Ditto for -gnatw.e
(Set_Dot_Warning_Flag): Implement -gnbatw.v/w.V
* usage.adb: Add lines for -gnatw.v/w.V
2009-11-30 Emmanuel Briot <briot@adacore.com>
* make.adb (Check_Standard_Library): use Full_Source_Name instead of
direct call to Find_File. The former provides caching of the results, so
might be more efficient
(Start_Compile_If_Necessary): Add comment on possible optimization,
not done for now.
From-SVN: r154825
2009-11-30 Robert Dewar <dewar@adacore.com>
* g-sha256.ads, s-sehamd.ads, s-sehamd.adb, g-sha512.ads, g-sha224.ads,
g-sha384.ads: Minor reformatting
2009-11-30 Emmanuel Briot <briot@adacore.com>
* adaint.h (file_attributes): Reduce size of the structure, so that it
is less costly to store in records.
* makeutl.adb:
(Check_Source_Info_In_ALI): use Full_Source_Name instead of a direct
call to Find_File, since the former provides caching when appropriate,
which limits the number of system calls in some cases.
* osint.ads, prj.ads (Source_Data): do not store directly the timestamp,
but the file attributes since we also need access to the size of the
ALI file to parse it. This gives an opportunity for saving system calls
on Unix systems.
From-SVN: r154817
2009-11-30 Gary Dismukes <dismukes@adacore.com>
* sem_prag.adb (Process_Convention): Change formal E to Ent. In the
case where the pragma's entity argument is a renaming, return the
entity denoted by the renaming rather than the renamed entity. Loop
through the homonyms of the original argument entity, rather than the
homonyms of any renamed entity. Correct call to Generate_Entity to
pass the homonym.
2009-11-30 Vincent Celier <celier@adacore.com>
* impunit.adb: Add packages that were added to the GNAT library:
GNAT.SHA224, GNAT.SHA256, GNAT.SHA384 and GNAT.SHA512.
* s-sechas.adb (Fill_Buffer_Copy): Fixes incorrect slice index
2009-11-30 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb: Minor reformatting
* g-md5.ads, g-sha1.ads: Add comment.
From-SVN: r154815
2009-11-30 Jerome Lambourg <lambourg@adacore.com>
* exp_ch3.adb (Make_Predefined_Primitive_Specs): Improve comment for
the Value_Type case.
2009-11-30 Thomas Quinot <quinot@adacore.com>
* a-textio.adb: Minor reformatting
2009-11-30 Pascal Obry <obry@adacore.com>
* adaint.c: Fix bug in passing parameter.
* expect.c: Include io.h to get definition of _open_osfhandle
From-SVN: r154810
2009-11-30 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb, sem_scil.adb (Adjust_SCIL_Node): Add missing management
of N_Unchecked_Type_Conversion nodes when searching for SCIL nodes.
(Expand_Call): Adjust decoration of SCIL node associated with relocated
function call.
2009-11-30 Emmanuel Briot <briot@adacore.com>
* prj-env.adb (Add_To_Source_Path): Preserve casing of directories
2009-11-30 Vincent Celier <celier@adacore.com>
* opt.ads (No_Split_Units): New flag initialized to False
2009-11-30 Jerome Lambourg <lambourg@adacore.com>
* exp_ch7.adb (Needs_Finalization): Add comments.
* exp_ch3.adb (Make_Predefined_Primitive_Specs): Improve handling of
CIL Value types.
From-SVN: r154809
2009-11-30 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Remove list of warning letters, and refer instead to
using gnatmake to get a brief list.
* debug.adb: Document -gnatd.i to disable pragma Warnings
* par-prag.adb, sem_prag.adb: Recognize -gnatd.i to disable Warnings
pragma.
* vms_data.ads: Add /NOWARNINGS_PRAGMS for -gnatd.i
2009-11-30 Geert Bosch <bosch@adacore.com>
* a-ngelfu.adb (Sin): Correct spelling of sine in comment.
2009-11-30 Vincent Celier <celier@adacore.com>
* gnatls.adb: Do not call Get_Target_Parameters in Verbose_Mode, as it
is not needed and gnatls fails when called with -v -nostdinc.
2009-11-30 Emmanuel Briot <briot@adacore.com>
* osint.adb, osint.ads (File_Time_Stamp): new subprogram.
From-SVN: r154807
2009-11-30 Robert Dewar <dewar@adacore.com>
* scans.ads (Wide_Wide_Character_Found): New flag
* scn.adb (Post_Scan): Set new flag Has_Wide_Wide_Character
* scng.adb (Set_String): Set new flag Wide_Wide_Character_Found
(Set_String): Fix failure to reset Wide_Character_Found
* sinfo.adb (Has_Wide_Wide_Character): New flag in N_String_Literal
* sinfo.ads (Has_Wide_Wide_Character): New flag in N_String_Literal
* a-ngelfu.adb: Minor reformatting & code reorganization.
* usage.adb: Fix typo in -gnatw.W line
From-SVN: r154804
2009-11-30 Robert Dewar <dewar@adacore.com>
* osint.adb, prj-nmsc.adb, sem_prag.adb, sem_util.adb: Minor
reformatting.
* csinfo.adb: Terminate run if improper use of reserved flag
* sinfo.ads, sinfo.adb (Is_Accessibility_Actual): Don't use reserved
Flag12, used Flag13 instead.
From-SVN: r154803
2009-11-30 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): Recognize documented switches that have a
separate parameter.
2009-11-30 Robert Dewar <dewar@adacore.com>
* sem_util.ads: Minor reformatting
* errout.adb: Minor reformatting
Minor code reorganization (use N_Subprogram_Specification to simplify)
* exp_ch7.adb: Add comment.
From-SVN: r154802
2009-11-30 Thomas Quinot <quinot@adacore.com>
* put_scos.adb (Put_SCOs): Do not generate a SCO unit header for a unit
that has no SCOs.
* scos.ads: Minor reformatting
2009-11-30 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb: Second unanalyzed parameter of Annotate is optional.
2009-11-30 Eric Botcazou <ebotcazou@adacore.com>
* init.c (__gnat_adjust_context_for_raise, Linux version): Add guard
for null PC saved in the context.
2009-11-30 Hristian Kirtchev <kirtchev@adacore.com>
* a-calend.adb (Day_Of_Week): Rewritten. The routine determines the
number of days from the Ada Epoch to the input date while ensuring that
both dates are in the same time zone.
From-SVN: r154801
2009-11-30 Emmanuel Briot <briot@adacore.com>
* clean.adb ("-eL"): Also set Follow_Links_For_Dirs, to match what is
done in other project-aware tools like gnatmake and gprbuild.
2009-11-30 Jerome Lambourg <lambourg@adacore.com>
* exp_ch3.adb (Make_Predefined_Primitive_Specs): Take care of CIL
ValueTypes.
* exp_ch7.adb (Needs_Finalization): Do not finalize CIL valuetypes.
* sem_util.adb (Is_Value_Type): Protect against invalid calls to Chars
(Is_Delegate): New method used for CIL.
* sem_util.ads (Is_Delegate): New method for CIL handling.
(Is_Value_Type): Improve documentation.
2009-11-30 Ed Schonberg <schonberg@adacore.com>
* errout.adb (Unwind_Internal_Type): Improve error reporting if the
type is an anonymous access to subprogram that is the type of a formal
in a subprogram spec.
2009-11-30 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check_Interfaces): In a Stand-Alone Library project, if
attribute Interfaces is not declared, then Library_Interface should
define the interfaces.
2009-11-30 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb: New semantics for Annotate.
From-SVN: r154800
2009-11-30 Emmanuel Briot <briot@adacore.com>
* gnat_ugn.texi: Extend doc for -eL
2009-11-30 Vincent Celier <celier@adacore.com>
* osint.adb (Executable_Name (File_Name_Type)): Put the Name in the
Name_Buffer before testing for a dot in the Name.
2009-11-30 Vincent Celier <celier@adacore.com>
* prj-part.adb (Project_Path_Name_Of): Resolve links for final result
if -eL has been specified.
From-SVN: r154798