* tree-ssa-pre.c (fini_pre): Take in_fre parameter. Free
loop information only if we initialized it.
(execute_pre): Call fini_pre with in_fre.
* tree-ssa-loop-ivcanon (try_unroll_loop_completely): Dump
if we do not unroll because we hit max-completely-peeled-insns.
Use our estimation for consistency, do allow shrinking.
Eric Botcazou [Fri, 1 Aug 2008 14:02:10 +0000 (14:02 +0000)]
ada-tree.h (DECL_PARM_ALT): Now DECL_PARM_ALT_TYPE.
* gcc-interface/ada-tree.h (DECL_PARM_ALT): Now DECL_PARM_ALT_TYPE.
* gcc-interface/decl.c (gnat_to_gnu_param): Fix formatting, simplify
and adjust for above renaming.
* gcc-interface/utils.c (convert_vms_descriptor): Likewise. Add new
gnu_expr_alt_type parameter. Convert the expression to it instead
of changing its type in place.
(build_function_stub): Adjust call to above function.
Eric Botcazou [Fri, 1 Aug 2008 12:39:57 +0000 (12:39 +0000)]
decl.c (gnat_to_gnu_entity): Remove dead code.
2008-08-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove dead
code. Do not get full definition of deferred constants with address
clause for a use. Do not ignore deferred constant definitions with
address clause. Ignore constant definitions already marked with the
error node.
<object>: Remove obsolete comment. For a deferred constant with
address clause, get the initializer from the full view.
* gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Definition_Clause>:
Rework and remove obsolete comment.
<N_Object_Declaration>: For a deferred constant with address clause,
mark the full view with the error node.
* gcc-interface/utils.c (convert_to_fat_pointer): Rework and fix
formatting nits.
* s-rident.ads: Add new restriction No_Stream_Optimizations.
* s-ststop.ads, s-ststop.adb: Comment reformatting.
Define enumeration type to designate different IO mechanisms.
Enchance generic package Stream_Ops_Internal to include an
implementation of Input and Output.
* exp_attr.adb (Find_Stream_Subprogram): If restriction
No_Stream_Optimization is active, choose the default byte IO
implementations of stream attributes for Strings.
Otherwise use the corresponding block IO version.
Gary Dismukes [Fri, 1 Aug 2008 09:29:30 +0000 (11:29 +0200)]
exp_ch6.adb (Expand_Call): Adjustment to previous fix for passing correct accessibility levels.
2008-08-01 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Expand_Call): Adjustment to previous fix for passing
correct accessibility levels. In the "when others" case, retrieve the
access level of the Etype of Prev rather than Prev_Orig, because the
original exression has not always been analyzed.
* gcc-interface/utils.c (convert_vms_descriptor): Add gnu_expr_alt_type
parameter.
Convert the expression to it instead of changing its type in place.
(build_function_stub): Adjust call to above function.
Arnaud Charlet [Fri, 1 Aug 2008 09:04:06 +0000 (11:04 +0200)]
sem_ch4.adb (Analyze_One_Call): Handle complex overloading of a procedure call whose prefix is a parameterless...
2008-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_One_Call): Handle complex overloading of a
procedure call whose prefix
is a parameterless function call that returns an access_to_procedure.
Gary Dismukes [Fri, 1 Aug 2008 09:03:35 +0000 (11:03 +0200)]
exp_ch6.adb (Expand_Call): Remove ugly special-case code that resets Orig_Prev to Prev in the case where...
2008-08-01 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Expand_Call): Remove ugly special-case code that resets
Orig_Prev to Prev in the case where the actual is N_Function_Call or
N_Identifier. This was interfering with other cases that are rewritten
as N_Identifier, such as allocators, resulting in passing of the wrong
accessibility level, and based on testing this code is apparently no
longer needed at all.
Ed Schonberg [Fri, 1 Aug 2008 09:03:23 +0000 (11:03 +0200)]
2008-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb:
(Check_Precondition_Postcondition): If not generating code, analyze the
expression in a postcondition that appears in a subprogram body, so that
it is properly decorated for ASIS use.
Vincent Celier [Fri, 1 Aug 2008 09:03:11 +0000 (11:03 +0200)]
2008-08-01 Vincent Celier <celier@adacore.com>
* mlib-utl.adb:
(Adalib_Path): New variable to store the path of the adalib directory
when procedure Specify_Adalib_Dir is called.
(Lib_Directory): If Adalib_Path is not null, return its value
(Specify_Adalib_Dir): New procedure
* mlib-utl.ads (Specify_Adalib_Dir): New procedure
* prj.adb (Object_Exist_For): Use Object_Generated, not
Objects_Generated that is removed and was never modified anyway.
* prj.ads:
(Path_Syntax_Kind): New enumeration type
(Language_Config): New component Path_Syntax, defaulted to Host.
Components PIC_Option and Objects_Generated removed, as they are not
used.
Ed Schonberg [Fri, 1 Aug 2008 09:02:44 +0000 (11:02 +0200)]
checks.adb (Apply_Float_Conversion_Check): If the expression to be converted is a real literal and the target type has...
2008-08-01 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Float_Conversion_Check): If the expression to be
converted is a real literal and the target type has static bounds,
perform the conversion exactly to prevent floating-point anomalies on
some targets.
Arnaud Charlet [Fri, 1 Aug 2008 08:19:04 +0000 (10:19 +0200)]
sem_ch12.ads (Need_Subprogram_Instance_Body): new function...
2008-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.ads (Need_Subprogram_Instance_Body): new function, to create
a pending instantiation for the body of a subprogram that is to be
inlined.
* sem_ch12.adb:
(Analyze_Subprogram_Instantiation): use Need_Subprogram_Instance_Body.
* sem_prag.adb (Make_Inline): If the pragma applies to an instance,
create a pending instance for its body, so that calls to the subprogram
can be inlined by the back-end.
Paolo Bonzini [Fri, 1 Aug 2008 08:18:13 +0000 (08:18 +0000)]
configure.ac: Do not generate libada-mk.
gcc:
2008-08-01 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Do not generate libada-mk. Do not subst
host_cc_for_libada.
* libada-mk.in: Remove.
* Makefile.in: Pass TARGET_LIBGCC2_CFLAGS to libgcc.mvars.
* configure: Regenerate.
libada:
2008-08-01 Paolo Bonzini <bonzini@gnu.org>
* configure.ac (warn_cflags): Substitute.
* configure: Regenerate.
* Makefile.in (libdir, WARN_CFLAGS): Substitute.
(GCC_WARN_CFLAGS): Remove NOCOMMON_FLAG.
(ADA_CFLAGS, T_ADA_CFLAGS, X_ADA_CFLAGS, ALL_ADA_CFLAGS): Remove,
they were unused.
(libada-mk): Do not include. Include libgcc.mvars instead.
(tmake_file): Remove, do not include.
(FLAGS_TO_PASS): Pass dummy values for exeext and CC.
* configure: Regenerate.
gnattools:
2008-08-01 Paolo Bonzini <bonzini@gnu.org>
* configure.ac (warn_cflags): Substitute.
* configure: Regenerate.
* Makefile.in (libdir, exeext, WARN_CFLAGS): Substitute.
(GCC_WARN_CFLAGS): Remove NOCOMMON_FLAG.
(ADA_INCLUDE_DIR, ADA_RTL_OBJ_DIR): Remove as they were unused.
(libsubdir): Remove.
(libada-mk): Do not include. Include libgcc.mvars instead.
(xmake_file): Remove, do not include.
* gcc-interface/trans.c (call_to_gnu): Removed unneeded gnat_actual
argument in call fill_vms_descriptor.
* gcc-interface/utils.c (build_vms_descriptor32): Renamed from
build_vms_descriptor and enhanced to hande Short_Descriptor mechanism.
(build_vms_descriptor): Renamed from build_vms_descriptor64.
(convert_vms_descriptor32): New function.
(convert_vms_descriptor64): New function.
(convert_vms_descriptor): Rewrite to handle both 32bit and 64bit
descriptors.
* gcc-interface/utils2.c (fill_vms_descriptor): Revert previous changes,
no longer needed.
tree-pass.h: Added comment about not dumping passes with name starting with star in struct...
2008-08-01 Basile Starynkevitch <basile@starynkevitch>
* gcc/tree-pass.h: Added comment about not dumping passes with name
starting with star in struct opt_pass.
* gcc/passes.c (register_dump_files_1): Don't do dump for a pass with
name starting with star.
* gcc/doc/passes.texi (Pass manager): Mention pass names and special
meaning of star prefix to avoid dump.
Chris Fairles [Thu, 31 Jul 2008 19:37:21 +0000 (19:37 +0000)]
chrono (duration): Use explicitly defaulted ctor, cctor, dtor and assignment.
2008-07-31 Chris Fairles <chris.fairles@gmail.com>
* include/std/chrono (duration): Use explicitly defaulted ctor, cctor,
dtor and assignment. Add diagnostics as per 20.8.3 paragraphs 2, 3
and 4 in WD. Other minor tweaks.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: New.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
Jakub Jelinek [Thu, 31 Jul 2008 19:12:14 +0000 (21:12 +0200)]
re PR preprocessor/36649 (-H option doesn't work as expected)
PR preprocessor/36649
* files.c (struct report_missing_guard_data): New type.
(report_missing_guard): Put paths into an array instead of printing
them right away. Return 1 rather than 0.
(report_missing_guard_cmp): New function.
(_cpp_report_missing_guards): Sort and print paths gathered by
report_missing_guard callback.
* gcc.dg/pch/cpp-3.hs: Add include guards.
* gcc.dg/pch/cpp-3a.h: Likewise.
* gcc.dg/pch/cpp-3b.h: Likewise.
* gcc.dg/cpp/mi8.c: New test.
* gcc.dg/cpp/mi8a.h: New file.
* gcc.dg/cpp/mi8b.h: New file.
* gcc.dg/cpp/mi8c.h: New file.
* gcc.dg/cpp/mi8d.h: New file.
mkstemps.c (mkstemps): If open failed with errno other than EEXIST, return immediately.
* mkstemps.c (mkstemps): If open failed with errno other than
EEXIST, return immediately.
* make-temp-file.c: Include errno.h.
(make_temp_file): If mkstemps failed, print an error message
before aborting.
Paolo Carlini [Thu, 31 Jul 2008 18:43:08 +0000 (18:43 +0000)]
libstdc++.exp (libstdc++_init): Set v3-libgomp.
2008-07-31 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (libstdc++_init): Set v3-libgomp.
(check_v3_target_parallel_mode): Robustify, just follow the
structure of testsuite/Makefile.am.
Jakub Jelinek [Thu, 31 Jul 2008 18:08:36 +0000 (20:08 +0200)]
re PR rtl-optimization/36419 (Wrong unwind info with -Os -fasynchronous-unwind-tables)
PR rtl-optimization/36419
* dwarf2out.c (barrier_args_size): New variable.
(compute_barrier_args_size, compute_barrier_args_size_1): New
functions.
(dwarf2out_stack_adjust): For BARRIERs call compute_barrier_args_size
if not called yet in the current function, use barrier_args_size
array to find the new args_size value.
(dwarf2out_frame_debug): Free and clear barrier_args_size.
Jose Ruiz [Thu, 31 Jul 2008 14:41:01 +0000 (16:41 +0200)]
2008-07-31 Jose Ruiz <ruiz@adacore.com>
* s-parame-vxworks.adb
Document that this body is used for RTX in RTSS (kernel) mode.
* gcc-interface/Makefile.in
(LIBGNAT_TARGET_PAIRS for the rtx_rtss run time): Use the
s-parame-vxworks.adb body in order to have reasonable stack sizes in
RTX RTSS kernel mode. Virtual memory is not used in that case, so we
cannot ask for too big values.
Gary Dismukes [Thu, 31 Jul 2008 13:53:55 +0000 (15:53 +0200)]
2008-07-31 Gary Dismukes <dismukes@adacore.com>
* sem_aggr.adb:
(Resolve_Record_Aggregate): Bypass error that a type without
components must have a "null record" aggregate when compiling for Ada
2005, since it's legal to give an aggregate of form (others => <>)
for such a type.
Ed Schonberg [Thu, 31 Jul 2008 13:31:37 +0000 (15:31 +0200)]
sem_ch10.adb (Build_Unit_Name): If the unit name in a with_clause has the form A.B.C and B is a unit renaming...
2008-07-31 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Build_Unit_Name): If the unit name in a with_clause
has the form A.B.C and B is a unit renaming, analyze its compilation
unit and add a with_clause on A.b to the context.
* bindgen.adb Comment reformatting. Update the list of run-time globals.
(Gen_Adainit_Ada): Add the declaration, import and value set for
configuration flag Canonical_Streams.
(Gen_Adainit_C): Add the declaration and initial value of external
symbol __gl_canonical_streams.
* init.c: Update the list of global values computed by the binder.
* opt.ads: Add flag Canonical_Streams.
* par-prag.adb (Prag): Include Pragma_Canonical_Streams to the list of
semantically handled pragmas.
* sem_prag.adb: Add an entry into enumeration type Sig_Flags.
(Analyze_Pragma): Add case for pragma Canonical_Streams.
* snames.adb: Add character value for name Canonical_Streams.
* snames.ads:
Add Name_Canonical_Streams to the list of configuration pragmas.
Add Pragma_Canonical_Streams to enumeration type Pragma_Id.
* snames.h: Add a definition for Pragma_Canonical_Streams.
* s-ststop.adb:
Add a flag and import to seize the value of external symbol
__gl_canonical_streams. Update comment and initial value of constant
Use_Block_IO.
* gnat_rm.texi: Add section of pragma Canonical_Streams.
* gnat_ugn.texi:
Add pragma Canonical_Streams to the list of configuration pragmas.
* s-stausa.ad? (Fill_Stack): Stack_Used_When_Filling is now stored
anymore - just used internally.
Added handling of very small tasks - when the theoretical size is
already full at the point of the call.
(Report_Result): Fixed result computation, Stack_Used_When_Filling does
not need to be added to the result.
Javier Miranda [Thu, 31 Jul 2008 13:25:48 +0000 (15:25 +0200)]
sem_ch4.adb (Valid_First_Argument_Of): Complete its functionality to handle synchronized types.
2008-07-31 Javier Miranda <miranda@adacore.com>
* sem_ch4.adb (Valid_First_Argument_Of): Complete its functionality to
handle synchronized types. Required to handle well the object.operation
notation applied to synchronized types.