2009-06-22 Tobias Burnus <burnus@net-b.de>
PR fortran/40472
PR fortran/50520
* simplify.c (gfc_simplify_spread): Fix the case that source=
is a scalar.
From-SVN: r148814
gcc/
* doc/invoke.texi (Link Options): -nodefaultlibs and -nostdlib
override library linkage flags such as -static-libgcc or
-shared-libgcc.
From-SVN: r148811
2009-06-22 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/util/testsuite_common_types.h (bitwise_operators,
bitwise_assignment_operators): Initialize a and b.
(struct has_bitwise_operators): Do not call the latter.
* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust
dg-error line numbers.
* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Likewise.
* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
From-SVN: r148809
2009-06-22 Kai Tietz <kai.tietz@onevision.com>
* config.gcc: Add for x86 and x64 mingw targets t-fprules-soft
and t-softfp support.
* config/i386/mingw32.h (LIBGCC2_HAS_TF_MODE): Enable TFmode.
(LIBGCC2_TF_CEXT): Define.
(TF_SIZE): Define.
ChangeLog for libgcc
2009-06-22 Kai Tietz <kai.tietz@onevision.com>
* config.host: Add soft emulation for x86 and x64 mingw targets.
* config/i386/64/_divtc3.c: Disable for mingw targets usage of
.symver assembly symbol.
* config/i386/64/_multc3.c: Likewise.
* config/i386/64/_powitf2.c: Likewise.
* config/i386/64/eqtf2.c: Likewise.
* config/i386/64/getf2.c: Likewise.
* config/i386/64/letf2.c: Likewise.
* config/i386/64/letf2.c: Likewise.
* config/i386/64/sfp-machine.h (_FP_W_TYPE): Define it
for x64 mingw target as unsigned long long.
(_FP_WS_TYPE): Define it for x64 mingw target as signed long
long.
(_FP_I_TYPE): Define it for x64 mingw target as long long.
From-SVN: r148798
2009-06-22 Jose Ruiz <ruiz@adacore.com>
* sysdep.c (__gnat_localtime_tzoff for RTX):
SystemTimeToTzSpecificLocalTime is not supported by RTX. Use
GetTimeZoneInformation instead.
2009-06-22 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Check_No_Direct_Boolean_Operators): New procedure
2009-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Collect_Previous_Instances): Do not collect
instantiations declared in a previous generic package body.
2009-06-22 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Add doc that X=True and X=False is allowed for the
restriction No_Direct_Boolean_Operators.
2009-06-22 Thomas Quinot <quinot@adacore.com>
* bindusg.adb: Minor fixes to gnatbind usage message
* sem_eval.adb: Minor reformatting
From-SVN: r148794
2009-06-22 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration, Freeze_Entity): Move to the
freezing point the check on the use of abstract types in object
declarations. Done to allow the declaration of C++ imported variables
or constants whose type corresponds with an imported C++ classes for
which the constructor is not imported.
2009-06-22 Thomas Quinot <quinot@adacore.com>
* sem_ch6.adb: Minor reformatting
2009-06-22 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Build_Initialization_Call): If a discriminated record
component is constrained with an expression rather than with a
discriminant of the enclosing type, use that expression when building
the call to default-initialize the component, when the call is part of
an aggregate with box initialization.
From-SVN: r148793
2009-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Overriding_Indicator): Clean up code, make warning
unconditional rather than a style check, because a formal name out of
order is suspicious.
2009-06-22 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Locate_Directory): Indicate the project name when
creating a directory automatically.
2009-06-22 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb (Create_Constrained_Components): For a subtype of an
untagged derived type, add a hidden component for every constrained
discriminant of the parent type to keep record layout consistent.
From-SVN: r148792
2009-06-22 Thomas Quinot <quinot@adacore.com>
* exp_ch3.adb: Minor code reorganization (avoid an unnecessary tree
copy).
2009-06-22 Ed Falis <falis@adacore.com>
* sysdep.c: remove include for nfsLib.h and an NFS specific error
message for VxWorks 653 vThreads: not supported by the OS.
* gsocket.h: disable sockets for VxWorks 653 vThreads.
2009-06-22 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb: Add ??? comment for bad use of Style_Check
2009-06-22 Matthew Gingell <gingell@adacore.com>
Arnaud Charlet <charlet@adacore.com>
* a-stzhas.adb, a-stwiha.adb, impunit.adb, a-swbwha.adb, a-shcain.adb,
s-htable.adb, a-szuzha.adb, a-stunha.adb, a-stboha.adb, a-strhas.adb,
g-spitbo.adb, s-strhas.adb, a-szbzha.adb, s-strhas.ads, Makefile.rtl,
a-swuwha.adb: New unit System.String_Hash.
Refactor redundant cut and pasted hash functions with instances of a
new generic hash function.
Implement a new string hashing algorithm which appears in testing to
be move effective than to previous approach.
* gcc-interface/Make-lang.in: Update dependencies.
* gcc-interface/Makefile.in: Reindent correctly vms targets.
Fix setting of TOOLS_TARGET_PAIRS for bare board platforms.
Disable socket support for Vxworks 653 vThreads.
Improve handling of signals on darwin.
(GNATMAKE_OBJS): Update dependencies.
From-SVN: r148789
2009-06-22 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40492
* tree-sra.c (sra_modify_assign): Pass zero offsets to
build_ref_for_offset.
* testsuite/g++.dg/torture/pr40492.C: New test.
From-SVN: r148787
2009-06-22 Robert Dewar <dewar@adacore.com>
* sinput.adb, sinput.ads (Expr_First_Char, Expr_Last_Char): Replaced
by Sloc_Range.
* freeze.adb: Minor comment updates
* s-valrea.adb (Bad_Based_Value): New procedure
(Scan_Real): Raise exceptions with messages
2009-06-22 Matthew Gingell <gingell@adacore.com>
* adaint.h: Complete previous change.
2009-06-22 Thomas Quinot <quinot@adacore.com>
* exp_ch7.ads, exp_ch3.adb: Minor reformatting
2009-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Overriding_Indicator): When style checks are
enabled, emit warning when a non-controlling argument of the overriding
operation appears out of place vis-a-vis of the formal of the
overridden operation.
From-SVN: r148782
2009-06-22 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): Close temporary files after all file names
have been written into it.
2009-06-22 Matthew Gingell <gingell@adacore.com>
* adaint.c, adaint.h, cstreams.c: Call stat64 on platforms where it is
available.
2009-06-22 Thomas Quinot <quinot@adacore.com>
* sem_disp.adb (Check_Direct_Call): Handle the case where the full
view of the root type is visible at the point of the call.
2009-06-22 Pat Rogers <rogers@adacore.com>
* gnat_ugn.texi: Revised a sentence to correct a minor grammar error.
From-SVN: r148781
* config/pa/pa.c (output_call): Don't optimize post call jumps
into return address adjustments if the call may throw.
testsuite/
* gnat.dg/raise_ce.adb: Helper for ...
* gnat.dg/handle_and_return.adb: New test.
From-SVN: r148780
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40443
* interface.c (gfc_search_interface): Hold back a match to an
elementary procedure until all other possibilities are
exhausted.
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40443
* gfortran.dg/generic_18.f90: New test.
From-SVN: r148777
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40443
* interface.c (gfc_search_interface): Hold back a match to an
elementary procedure until all other possibilities are
exhausted.
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40443
* gfortran.dg/generic_18.f90: New test.
From-SVN: r148776
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40472
* simplify.c (gfc_simplify_spread): Restrict the result size to
the limit for an array constructor.
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40472
* gfortran.dg/spread_size_limit.f90: New test.
From-SVN: r148775
* arm.c (thumb1_output_casesi): New function.
* arm.h (CASE_VECTOR_PC_RELATIVE): Thumb-1 code is also relative if
optimizing for size or PIC.
(CASE_VECTOR_SHORTEN_MODE): Handle thumb-1.
* arm.md (UNSPEC_THUMB1_CASESI): New constant.
(casesi): Handle Thumb-1 when optimizing for size or PIC.
(thumb1_casesi_internal_pic): New expand rule.
(thumb1_casesi_dispatch): New pattern.
* aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Use shortened vectors for
thumb-1 mode.
* coff.h (JUMP_TABLES_IN_TEXT_SECTION): Thumb-1 jump tables are now
in the text seciton when PIC or optimizing for size.
* elf.h (JUMP_TABLES_IN_TEXT_SECTION): Likewise.
* lib1funcs.asm ([__ARM_EABI__]): Add an attribute describing stack
preservation properties of code.
(__gnu_thumb1_case_sqi, __gnu_thumb1_case_uqi): New functions.
(__gnu_thumb1_case_shi, __gnu_thumb1_case_uhi): New functions.
(__gnu_thumb1_case_si): New function.
* t-arm (LIB1ASMSRC): Define here.
(LIB1ASMFUNCS): Add some common functions.
* t-arm-elf (LIB1ASMSRC): Delete.
(LIB1ASMFUNCS): Append to existing set.
* t-pe (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
* t-strongarm-elf (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
* t-symbian (LIB1ASMFUNCS): Likewise.
* t-vxworks (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
* t-wince-pe (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
From-SVN: r148770
* gcc.c-torture/unsorted/dump-noaddr.x (dump_compare): Use --dumpbase
to put dump files in a subdirectory.
* gcc/testsuite/lib/gcc-dg.exp (cleanup-saved-temps): Also remove
".o" temporary files.
From-SVN: r148768
2009-06-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/39850
* interface.c (gfc_compare_interfaces): Take care of implicit typing
when checking the function attribute. Plus another bugfix.
(compare_parameter): Set attr.function and attr.subroutine according
to the usage of a procedure as actual argument.
2009-06-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/39850
* gfortran.dg/interface_19.f90: Add 'cleanup-modules'.
* gfortran.dg/interface_20.f90: Ditto.
* gfortran.dg/interface_21.f90: Ditto.
* gfortran.dg/interface_22.f90: Ditto.
* gfortran.dg/interface_30.f90: New.
* gfortran.dg/proc_ptr_11.f90: Fix invalid test case.
From-SVN: r148767
2009-06-21 Thomas Quinot <quinot@adacore.com>
* exp_ch3.adb, exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb,
sem_ch13.adb, sem_elab.adb (Exp_Prag.Expand_Pragma_Import_Or_Interface):
Factor out code to new subprogram...
(Exp_Util.Find_Init_Call): New shared routine to find the init proc call
for a default initialized variable.
(Freeze.Check_Address_Clause): Do not reset Has_Delayed_Freeze on an
entity that has an associated freeze node.
(Sem_Ch13.Analyze_Attribute_Definition_Clause, case Address):
If there is an init call for the object, defer it to the object freeze
point.
(Check_Elab_Call.Find_Init_Call): Rename to Check_Init_Call, to avoid
name clash with new subprogram introduced in Exp_Util.
2009-06-21 Robert Dewar <dewar@adacore.com>
* einfo.ads: Minor reformatting
From-SVN: r148764
2009-06-21 Ed Falis <falis@adacore.com>
* env.c (__gnat_environ): return NULL for vThreads - unimplemented
2009-06-21 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads: Update comments.
2009-06-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_disp.adb (Check_Direct_Call): New routine. Dispatching calls
where the controlling formal is of private class-wide type whose
completion is a synchronized type can be converted into direct calls.
2009-06-21 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): When all sources of the project are to be
indicated to gnatcheck, gnatpp or gnatmetric, always specify the list
of sources using -files=, so that the distinction can be made by the
tool of a call with no source (to display the usage) from a call with
a project file that contains no source.
2009-06-21 Jerome Lambourg <lambourg@adacore.com>
* exp_ch3.adb (Build_Array_Init_Proc): Do not build the init proc in
case of VM convention arrays.
From-SVN: r148763
2009-06-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38729
* tree-ssa-loop-niter.c (find_loop_niter_by_eval): Restrict
to loops with a single exit if -fno-expensive-optimizations.
From-SVN: r148761
* var-tracking.c (struct shared_hash_def, shared_hash): New types.
(dataflow_set): Change vars type from htab_t to shared_hash.
(shared_hash_pool, empty_shared_hash): New variables.
(vars_clear): Removed.
(shared_hash_shared, shared_hash_htab, shared_hash_copy,
shared_hash_find_slot_unshare, shared_hash_find_slot,
shared_hash_find_slot_noinsert, shared_hash_find): New
static inlines.
(shared_hash_unshare, shared_hash_destroy): New functions.
(unshare_variable): Unshare set->vars if shared, use
shared_hash_htab.
(vars_copy): Use htab_traverse_noresize instead of htab_traverse.
(get_init_value, find_src_set_src, dump_dataflow_set,
clobber_variable_part, emit_notes_for_differences): Use
shared_hash_htab.
(dataflow_set_init): Remove second argument, set vars to
empty_shared_hash instead of creating a new htab.
(dataflow_set_clear): Call shared_hash_destroy and set vars
to empty_shared_hash instead of calling vars_clear.
(dataflow_set_copy): Don't call vars_copy, instead just share
the src htab with dst.
(variable_union): Use shared_hash_*, use initially NO_INSERT
lookup if set->vars is shared. Don't keep slot cleared before
calling unshare_variable. Unshare set->vars if needed.
Even ->refcount == 1 vars must be unshared if set->vars is shared
and var needs to be modified.
(variable_canonicalize): New function.
(dataflow_set_union): If dst->vars is empty, just share src->vars
with dst->vars and traverse with variable_canonicalize to canonicalize
and unshare what is needed.
(dataflow_set_different): If old_set and new_set use the same shared
htab, they aren't different. If number of htab elements is different,
htabs are different. Use shared_hash_*.
(dataflow_set_destroy): Call shared_hash_destroy instead of
htab_delete.
(compute_bb_dataflow, emit_notes_in_bb, vt_emit_notes): Don't pass
second argument to dataflow_set_init.
(vt_initialize): Likewise. Initialize shared_hash_pool and
empty_shared_hash, move bb in/out initialization afterwards.
Use variable_htab_free instead of NULL as changed_variables del hook.
(variable_was_changed): Change type of second argument to pointer to
dataflow_set. When inserting var into changed_variables, bump
refcount. Unshare set->vars if set is shared htab and slot needs to
be cleared.
(set_variable_part): Use shared_hash_*, use initially NO_INSERT
lookup if set->vars is shared. Unshare set->vars if needed.
Even ->refcount == 1 vars must be unshared if set->vars is shared
and var needs to be modified. Adjust variable_was_changed caller.
(delete_variable_part): Use shared_hash_*. Even ->refcount == 1
vars must be unshared if set->vars is shared and var needs to be
modified. Adjust variable_was_changed caller.
(emit_note_insn_var_location): Don't pool_free var.
(emit_notes_for_differences_1): Initialize empty_var->refcount to 0
instead of 1.
(vt_finalize): Call htab_delete on empty_shared_hash->htab and
free_alloc_pool on shared_hash_pool.
From-SVN: r148760
2009-06-20 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/40497
* include/bits/stl_iterator_base_funcs.h (next, prev): Fix the
signature per the current C++1x draft (N2857).
* testsuite/24_iterators/operations/40497.cc: Add.
From-SVN: r148751