* gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
diagnostic for component size mismatch wrt volatile requirements.
Add a gcc_unreachable() at the end of the checks for size. Split
the check on volatile for positions into one check on atomic and
a subsequent one on volatile.
From-SVN: r194946
2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
Mikael Morin <mikael@gcc.gnu.org>
PR fortran/55827
* class.c (gfc_fix_class_refs): Adapt ts initialization for the case
e->symtree == NULL.
* trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
Mikael Morin <mikael@gcc.gnu.org>
PR fortran/55827
* gfortran.dg/use_22.f90: New test.
Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org>
From-SVN: r194928
2013-01-05 Tobias Burnus <burnus@net-b.de>
* class.c (finalize_component): Used passed offset expr.
(finalization_get_offset): New static function.
(finalizer_insert_packed_call, generate_finalization_wrapper):
Use it to handle noncontiguous arrays.
From-SVN: r194927
2013-01-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55172
* match.c (copy_ts_from_selector_to_associate): Remove call to
gfc_resolve_expr and replace it with explicit setting of the
array reference type.
* resolve.c (resolve_select_type): It is an error if the
selector is coindexed.
2013-01-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55172
* gfortran.dg/select_type_31.f03: New test.
From-SVN: r194916
PR other/54800
* simple-object-mach-o.c (simple_object_mach_o_segment): Don't
bother to zero out a buffer we are about to set anyhow.
From-SVN: r194914
2013-01-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/55862
* tree-ssa-pre.c (phi_translate_1): Valueize SSA names after
translating them through PHI nodes.
* gcc.dg/torture/pr55862.c: New testcase.
From-SVN: r194906
2013-01-04 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/55755
* tree-sra.c (sra_modify_assign): Do not check that an access has no
children when trying to avoid producing a VIEW_CONVERT_EXPR.
testsuite/
* gcc.dg/torture/pr55755.c: New test.
* gcc.dg/tree-ssa/sra-13.c: Likewise.
* gcc.dg/tree-ssa/pr45144.c: Update.
From-SVN: r194905
2013-01-04 Robert Dewar <dewar@adacore.com>
* sinfo.ads: Clean up order of N_xxx subtypes
2013-01-04 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Check_Target): Allow --autoconf= with no target.
From-SVN: r194897
2013-01-04 Robert Dewar <dewar@adacore.com>
* types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
2013-01-04 Robert Dewar <dewar@adacore.com>
* par-ch6.adb (P_Subprogram): Better handling of missing IS
after expression function.
* par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
2013-01-04 Robert Dewar <dewar@adacore.com>
* exp_util.ads, exp_util.adb (Insert_Actions): In expression with
actions case, new actions are appended to the sequence rather than
prepended.
2013-01-04 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
* usage.adb: Add lines for -gnatw.d/w.D switches.
* warnsw.adb: Minor fixes (some missing cases of setting
Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
From-SVN: r194895
2013-01-04 Robert Dewar <dewar@adacore.com>
* exp_util.adb (Remove_Side_Effects): Make sure scope suppress
is restored on exit.
2013-01-04 Robert Dewar <dewar@adacore.com>
* usage.adb: Document -gnateF (check overflow for predefined Float).
2013-01-04 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Type_Conversion): Remove incorrect
prevention of call to Apply_Type_Conversion_Checks, which resulted
in missing check flags in formal mode.
2013-01-04 Vincent Celier <celier@adacore.com>
* makeutl.ads (Db_Switch_Args): New table used by gprbuild.
* prj-conf.adb (Check_Builder_Switches): Check for switches
--config= (Get_Db_Switches): New procedure to get the --db
switches so that they are used when invoking gprconfig in
auto-configuration.
(Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
From-SVN: r194894
2013-01-04 Pascal Obry <obry@adacore.com>
* prj-nmsc.adb: Minor reformatting.
2013-01-04 Vincent Celier <celier@adacore.com>
* makeutl.ads (Root_Environment): New variable, moved rom
gprbuild (Load_Standard_Base): New Boolean variable, moved
from gprbuild.
* prj-conf.adb (Check_Builder_Switches): New procedure to check
for switch --RTS in package Builder. If a runtime specified
by --RTS is a relative path name, but not a base name, then
find the path on the Project Search Path.
(Do_Autoconf): Call Check_Builder_Switches.
(Locate_Runtime): New procedure, moved from gprbuild, to get the
absolute paths of runtimes when they are not specified as a base name.
* prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
From-SVN: r194893
2013-01-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Private_Derived_Type): Set
Has_Private_Ancestor on type derived from an untagged private
type whose full view has discriminants
* sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
aggregate for untagged record type with private ancestor.
From-SVN: r194892
2013-01-04 Robert Dewar <dewar@adacore.com>
* table.adb: Minor reformatting.
2013-01-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
not come from source does not generate a warning for redundant
with_clauses.
2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
* par-prag.adb: Add pragma Global to the list of pragmas that
do not need special processing by the parser.
* sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
Global into a pragma without any form of legality checks. The
work is done by Analyze_Pragma. The aspect and pragma are both
marked as needing delayed processing. Insert the corresponding
pragma of aspect Abstract_State in the visible declarations of the
related package.
(Check_Aspect_At_Freeze_Point): Aspect Global
does not need processing even though it is marked as delayed.
Alphabetize the list on aspect names.
* sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
(Analyze_Pragma): Add ??? comment about the grammar of pragma
Abstract_State. Move the error location from the pragma to the
state to improve the quality of error placement. Add legality
checks for pragma Global.
* snames.ads-tmpl Add the following specially recognized names
2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb: Fix minor typo.
2013-01-04 Ed Schonberg <schonberg@adacore.com>
* par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
accept an aspect name followed by a comma, indicating a defaulted
boolean aspect.
From-SVN: r194890
2013-01-04 Thomas Quinot <quinot@adacore.com>
* sinfo.ads: Minor documentation update.
2013-01-04 Thomas Quinot <quinot@adacore.com>
* sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
before resolving initialization expression.
2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Generate_Index_Checks): Delay the generation of
the check for an indexed component where the prefix mentions
Loop_Entry until the attribute has been properly expanded.
* exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
decoration of the constant that captures the value of Loop_Entry's
prefix at the entry point into a loop. Generate index checks
for an attribute reference that has been transformed into an
indexed component.
2013-01-04 Thomas Quinot <quinot@adacore.com>
* exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
do if Obj is already frozen.
(Exp_Util.Find_Init_Call): Rename to...
(Exp_Util.Remove_Init_Call): New subprogram, renamed from
Find_Init_Call. Remove the initialization call from the enclosing
list if found, and if it is from an Initialization_Statements
attribute, reset it.
(Exp_Util.Append_Freeze_Action): Minor code reorganization.
(Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
allocated (as is already done in Append_Freeze_Action).
(Freeze.Freeze_Entity): For an object with captured
Initialization_Statements and non-delayed freezeing, unwrap the
initialization statements and insert and them directly in the
enclosing list.
(Sem_Ch13.Check_Address_Clause): For an object
with Initialization_Statements and an address clause, unwrap the
initialization statements when moving them to the freeze actions.
From-SVN: r194887