summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-01 15:23:18 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-01 15:23:18 +0000
commitb9e1d640913ee05bd402b5f146e58a4a2463069f (patch)
treee603e4f4a1aea0ced7a9e7d8de8a08f79dce9733
parentc2c7abfc2202fbbbbf75b1cf33ac4a0b5d6d5e13 (diff)
downloadgcc-b9e1d640913ee05bd402b5f146e58a4a2463069f.tar.gz
2008-10-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r140812 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@140815 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.melt3
-rw-r--r--MAINTAINERS2
-rw-r--r--gcc/ChangeLog136
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog856
-rw-r--r--gcc/ada/gcc-interface/Makefile.in17
-rw-r--r--gcc/ada/system-linux-ppc64.ads155
-rw-r--r--gcc/c-common.c25
-rw-r--r--gcc/c-common.h1
-rw-r--r--gcc/c-parser.c7
-rw-r--r--gcc/c-typeck.c2
-rw-r--r--gcc/config.gcc5
-rw-r--r--gcc/config/i386/i386.opt4
-rw-r--r--gcc/config/i386/linux.h5
-rw-r--r--gcc/config/i386/linux64.h5
-rw-r--r--gcc/config/rs6000/predicates.md3
-rw-r--r--gcc/config/rs6000/rs6000-c.c3
-rw-r--r--gcc/config/rs6000/rs6000.c148
-rw-r--r--gcc/config/rs6000/rs6000.h8
-rw-r--r--gcc/config/rs6000/rs6000.md274
-rw-r--r--gcc/config/rs6000/rs6000.opt12
-rw-r--r--gcc/cp/ChangeLog19
-rw-r--r--gcc/cp/decl.c4
-rw-r--r--gcc/cp/parser.c25
-rw-r--r--gcc/cp/semantics.c1
-rw-r--r--gcc/doc/invoke.texi23
-rw-r--r--gcc/dwarf2out.c4
-rw-r--r--gcc/expr.c71
-rw-r--r--gcc/fortran/ChangeLog10
-rw-r--r--gcc/fortran/symbol.c13
-rw-r--r--gcc/fortran/trans-types.c10
-rw-r--r--gcc/ifcvt.c10
-rw-r--r--gcc/reload1.c24
-rw-r--r--gcc/testsuite/ChangeLog47
-rw-r--r--gcc/testsuite/g++.dg/abi/offsetof.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-cvt.C4
-rw-r--r--gcc/testsuite/g++.dg/init/struct1.C4
-rw-r--r--gcc/testsuite/g++.dg/init/struct2.C2
-rw-r--r--gcc/testsuite/g++.dg/init/struct3.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/error32.C12
-rw-r--r--gcc/testsuite/g++.dg/parse/error33.C16
-rw-r--r--gcc/testsuite/g++.dg/warn/if-empty-1.C23
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/complex-6.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr37662.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr37669.c35
-rw-r--r--gcc/testsuite/gcc.dg/pr37663.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr36891.c1
-rw-r--r--gcc/testsuite/gcc.dg/utf-cvt.c4
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_common_1.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_common_2.f9020
-rw-r--r--gcc/testsuite/lib/target-supports.exp12
-rw-r--r--gcc/tree-complex.c3
-rw-r--r--gcc/tree-ssa-ccp.c11
-rw-r--r--gcc/tree-vect-transform.c48
-rw-r--r--gcc/tree-vrp.c18
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/testsuite/lib/libjava.exp3
-rw-r--r--libstdc++-v3/ChangeLog20
-rw-r--r--libstdc++-v3/include/Makefile.am1
-rw-r--r--libstdc++-v3/include/Makefile.in1
-rw-r--r--libstdc++-v3/include/debug/safe_association.h222
-rw-r--r--libstdc++-v3/include/debug/unordered_map456
-rw-r--r--libstdc++-v3/include/debug/unordered_set458
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/init-list.cc2
65 files changed, 2321 insertions, 1079 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b8dcc1e80a..0420f25ee16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-29 David Daney <david.daney@caviumnetworks.com>
+
+ * MAINTAINERS (Write After Approval): Update e-mail address.
+
2008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
* libtool.m4: Update to libtool 2.2.6.
diff --git a/ChangeLog.melt b/ChangeLog.melt
index 7ce0dbfdaab..7c4bbde7906 100644
--- a/ChangeLog.melt
+++ b/ChangeLog.melt
@@ -1,3 +1,6 @@
+2008-10-01 Basile Starynkevitch <basile@starynkevitch.net>
+ MELT branch merged with trunk r140812
+
2008-09-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r140750
diff --git a/MAINTAINERS b/MAINTAINERS
index 81ebd154b06..b60d24de259 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -295,7 +295,7 @@ R. Kelley Cook kcook@gcc.gnu.org
Christian Cornelssen ccorn@cs.tu-berlin.de
François-Xavier Coudert fxcoudert@gcc.gnu.org
Ian Dall ian@beware.dropbear.id.au
-David Daney ddaney@avtrex.com
+David Daney david.daney@caviumnetworks.com
Bud Davis jmdavis@link.com
Benoit Dupont de Dinechin benoit.dupont-de-dinechin@st.com
Mohan Embar gnustuff@thisiscool.com
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 19c118142bb..8dd8eb5c57e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,139 @@
+2008-10-01 Richard Henderson <rth@redhat.com>
+
+ PR tree-opt/35737
+ * tree-complex.c (set_component_ssa_name): Don't optimize
+ is_gimple_min_invariant values with ssa_names in abnormal phis.
+
+2008-09-30 Paolo Bonzini <bonzini@gnu.org>
+
+ PR tree-optimization/37662
+ * tree-ssa-ccp.c (fold_gimple_assign): Invert the operands of a
+ commutative binary operation if they are in the wrong order and
+ fold_build2 produces non-GIMPLE.
+
+2008-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/37662
+ PR tree-optimization/37663
+ * tree-vrp.c (simplify_truth_ops_using_ranges): Don't call
+ get_value_range with non-SSA_NAME. Don't assert operands have been
+ folded, instead just bail out.
+
+2008-09-30 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * config/rs6000/rs6000.md (fnmadds combiner): Revert typo.
+
+2008-09-30 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/37491
+ * tree-vect-transform.c (vect_create_data_ref_ptr): Properly
+ build restrict-qualified pointers.
+ (vectorizable_store): Move alias check later.
+ (vectorizable_load): Likewise.
+
+2008-09-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * c-common.c (empty_if_body_warning): Remove.
+ * c-common.h (empty_if_body_warning): Remove.
+ * c-parser.c (c_parser_if_body, c_parser_else_body): Implement
+ here the -Wempty-body warning for `if' and `else' statements.
+ * c-typeck.c (c_finish_if_stmt): Do not call empty_body_warning.
+
+2008-09-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.opt: Add msse2avx.
+
+ * config/i386/linux.h (ASM_SPEC): New. Support -msse2avx.
+ * config/i386/linux64.h (ASM_SPEC): Likewise.
+
+ * doc/invoke.texi: Document -msse2avx.
+
+2008-09-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * dwarf2out.c (constant_size): Use HOST_WIDE_INT in parameter type.
+
+2008-09-29 Joseph Myers <joseph@codesourcery.com>
+
+ * ifcvt.c (noce_emit_store_flag): If using condition from original
+ jump, reverse it if if_info->cond was reversed.
+
+2008-09-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * expr.c (expand_expr_real_1) <normal_inner_ref>: Force op0 to
+ non-constant memory if it cannot be forced to constant memory.
+ Overhaul surrounding code and factor out common condition.
+
+2008-09-29 Jeff Law <law@redhat.com>
+
+ * reload1.c (alter_reg): Add missing curly braces.
+
+2008-09-29 Michael J. Eager <eager@eagercon.com>
+
+ * config/rs6000/predicates.md (easy_fp_constant): Single FP consts
+ are easy.
+ * config/rs6000/rs6000.c (rs6000_override_options): Move
+ rs6000_init_hard_regno_mode_ok after all options changed.
+ Set rs6000_single_float, rs6000_double_float if TARGET_HARD_FLOAT.
+ (rs6000_handle_option): Process -msingle-float, -mdouble-float,
+ -msimple-fpu flags. Add warning messages if single FP not configured.
+ (rs6000_file_start): Output gnu_attribute for single-float.
+ (legitimate_lo_sum_address_p): Condition on TARGET_DOUBLE_FLOAT.
+ (rs6000_legitimize_address): Likewise.
+ (rs6000_legitimize_reload_address): Likewise.
+ (rs6000_emit_move): Condition on TARGET_DOUBLE_FLOAT,
+ TARGET_SINGLE_FLOAT.
+ (function_arg_advance): Likewise (partial conversion).
+ (setup_incoming_varargs): Condition on TARGET_DOUBLE_FLOAT.
+ (rs6000_gimplify_va_arg): Condition on TARGET_DOUBLE_FLOAT,
+ TARGET_SINGLE_FLOAT.
+ (rs6000_split_multireg_move): Condition on TARGET_DOUBLE_FLOAT.
+ (rs6000_emit_prologue): Likewise.
+ (rs6000_function_value): Condition on TARGET_DOUBLE_FLOAT,
+ TARGET_SINGLE_FLOAT.
+ (rs6000_libcall_value): Likewise.
+ * config/rs6000/rs6000.h (TARGET_SINGLE_FLOAT): New default to 1.
+ (TARGET_DOUBLE_FLOAT): New default to 1
+ (TARGET_SIMPLE_FPU): New default to 0
+ (TARGET_SINGLE_FPU): New default to 0
+ (TARGET_SINGLE_FLOAT_MODE): New.
+ (TARGET_DOUBLE_FLOAT_MODE): New.
+ * config/rs6000/singlefp.h: New; redefine TARGET_SINGLE_FLOAT,
+ TARGET_DOUBLE_FLOAT, TARGET_SIMPLE_FPU, TARGET_SINGLE_FPU,
+ UNITS_PER_FP_WORD
+ * config/rs6000/rs6000.md (define_mode_iterator): Condition on
+ TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT.
+ (extendsfdf2, extendsfdf2_fpr, truncdfsf2, truncdfsf2_fpr,
+ copysigndf3,fseldfsf4, negdf2, negdf2_fpr, absdf2, absdf2_fpr,
+ nabsdf2_fpr, adddf3, adddf3_fpr, subdf3, subdf3_fpr, muldf3,
+ muldf3_fpr, divdf3, divdf3_fpr, sqrtdf2, smaxdf3, smindf3,
+ movdfcc, *fseldfdf4, floatsidf2, *floatsidf2_internal,
+ floatunssidf2, *floatunssidf2_internal, fix_truncdfsi2,
+ *fix_truncdfsi2_internal, fix_truncdfsi2_internal_gfxopt,
+ fix_truncdfsi2_mfpgpr, fctiwz, btruncdf2, ceildf2, floordf2,
+ rounddf2, floatdidf2, floatsidf_ppc64_mfpgpr, floatsidf_ppc64,
+ floatunssidf_ppc64, fix_truncdfdi2, movdf_hardfloat32,
+ movdf_hardfloat64_mfpgpr, movdf_hardfloat64, extenddftf2_fprs,
+ extenddftf2_internal, trunctfdf2_internal2, fix_trunc_helper,
+ abstf2_internal, movdf_update1, movdf_update2, cmpdf_internal1,
+ cmptf_internal1, *cmptf_internal2): Condition on
+ TARGET_DOUBLE_FLOAT.
+ (aux_truncdfsf2, negsf2, *negsf2, abssf2, *abssf2, addsf3, subsf3,
+ mulsf3, divsf3, sqrtsf2, copysignsf3, smaxsf3, sminsf3, movsfcc,
+ *fselsfsf4, fixuns_truncsfsi2, fix_truncsfsi2, floatunssisf2,
+ btruncsf2, ceilsf2, floorsf2, roundsf2, floatdisf2_internal1,
+ floatdisf2_internal2, *movsf_hardfloat, trunctfsf2_fprs,
+ *movsf_update1, *movsf_update2, *cmpsf_internal1): Condition on
+ TARGET_SINGLE_FLOAT.
+ (divsf3, sqrtsf2, divdf3, divdf3_fpr): Condition on TARGET_SIMPLE_FPU.
+ * config/rs6000/rs6000.opt (-msingle-float): New.
+ (-mdouble-float): New.
+ (-msimple-fpu): New.
+ * doc/invoke.texi (RS/6000 and PowerPC Options): Add
+ -msingle-float, -mdouble-float, -msimple-fpu options.
+ * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Set
+ _SOFT_DOUBLE for -msingle-float.
+ * config.gcc: New config for target=powerpc-xilinx-eabi.
+
2008-09-29 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite.c (dot_all_scops_1): Remove unused checks. SCoPs always have
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 13731bb57cf..b1be787131c 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20080929
+20081001
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 3aa6f4d069a..7d06122ccaa 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-01 Andreas Schwab <schwab@suse.de>
+
+ * system-linux-ppc64.ads: New file.
+ * gcc-interface/Makefile.in: Add multilib handling for
+ powerpc-linux.
+
2008-09-26 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (gnat_to_gnu_entity) <object>: Cap the alignment promotion
@@ -22,11 +28,11 @@
2008-09-21 Laurent Guerby <laurent@guerby.net>
- PR ada/5911
+ PR ada/5911
* gcc-interface/Makefile.in: Add multilib handling for x86_64
and sparc.
* system-linux-sparcv9.ads: New file.
-
+
2008-09-20 Eric Botcazou <ebotcazou@adacore.com>
* exp_dbug.ads: Document new convention for the XVZ variable.
@@ -601,7 +607,7 @@
2008-08-20 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Record_Type): Improve msg for non-contiguous field
-
+
* sem_ch13.adb:
(Adjust_Record_For_Reverse_Bit_Order): Messages about layout are
now labeled as info msgs, not warnings.
@@ -657,7 +663,7 @@
and full views are available for the context type.
2008-08-18 Samuel Tardieu <sam@rfc1149.net>
- Robert Dewar <dewar@adacore.com>
+ Robert Dewar <dewar@adacore.com>
PR ada/30827
* bindgen.adb (Gen_Output_File_Ada): Zero-terminate the
@@ -726,7 +732,7 @@
* gcc-interface/Make-lang.in: Include CFLAGS_FOR_TARGET when cross.
2008-08-10 Samuel Tardieu <sam@rfc1149.net>
- Robert Dewar <dewar@adacore.com>
+ Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Op_Expon): Force evaluation of
left argument even when right argument is 0.
@@ -738,7 +744,7 @@
* gcc-interface/misc.c (gnat_handle_option): Replace set_Wunused
by warn_unused.
-
+
2008-08-08 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Generate_Prim_Op_References): New procedure, abstracted
@@ -788,7 +794,7 @@
begining of the command line.
(Append, Add): Renaming of Append to Add as this now allows addition
at the begining of the list.
-
+
* g-comlin.ads (Add_Switch): Handle addition of switches at the
begining of the command line.
@@ -1012,7 +1018,7 @@
* freeze.adb:
(Freeze_Entity): A deferred constant does not violate the restriction
- No_Default_Initialization,
+ No_Default_Initialization,
* sem_ch3.adb (Process_Subtype): An allocator is a valid construct that
can carry a null exclusion indicator, and on which an error may be
@@ -1070,7 +1076,7 @@
* a-wtdeio.adb (Put (Current_Output)): Use Fore in the call to Put
(File).
-
+
* a-ztdeio.adb: Ditto.
2008-08-05 Pascal Obry <obry@adacore.com>
@@ -1084,7 +1090,7 @@
(Wide_String_To_String): Returns a String with the same 'First as its
parameter S.
(Wide_Wide_String_To_String): Ditto
-
+
* s-wchwts.ads:
(Wide_String_To_String): Document that the lowest index of the returned
String is equal to S'First.
@@ -1099,16 +1105,16 @@
2008-08-05 Robert Dewar <dewar@adacore.com>
* opt.ads (Warn_On_Biased_Representation): New flag
-
+
* sem_ch13.adb:
(Analyze_Attribute_Definition_Clause): Issue warning when biased
representation is required.
(Minimum_Size): Don't allow biasing if enum rep clause case
-
+
* sem_warn.adb:
(Set_Dot_Warning_Switch): Add handling of -gnatw.b/B switches
(Set_Warning_Switch): Include -gnatw.b in -gnatwa, -gnatw.B in gnatws
-
+
* usage.adb: Add lines for -gnatw.b/B switches
2008-08-05 Pascal Obry <obry@adacore.com>
@@ -1200,7 +1206,7 @@
* prj-attr.ads:
(Others_Allowed_For): New Boolean function
(Attribute_Record): New Boolean component Others_Allowed
-
+
* prj-dect.adb:
(Parse_Attribute_Declaration): For associative array attribute where
others is allowed as the index, allow others as an index.
@@ -1273,7 +1279,7 @@
string.
(Start): Sort the switches by sections before iterating the command line
elements.
-
+
* g-comlin.ads (Define_Section, Add_Switch, Remove_Switch,
Is_New_Section, Current_Section): New methods or methods modified to
handle building command lines with sections.
@@ -1515,28 +1521,28 @@
* gprep.adb (Process_One_File): Call Prep.Preprocess with a Boolean
variable, but don't check the resulting value as it has no impact on
the processing.
-
+
* opt.ads:
(Generate_Processed_File): New Boolean flag, set to True in the compiler
when switch -gnateG is used.
-
+
* prep.adb:
(Preprocess): new Boolean out parameter Source_Modified. Set it to True
when the source is modified by the preprocessor and there is no
preprocessing errors.
-
+
* prep.ads (Preprocess): new Boolean out parameter Source_Modified
-
+
* sinput-l.adb:
(Load_File): Output the result of preprocessing if the source text was
modified.
-
+
* switch-c.adb (Scan_Front_End_Switches): Recognize switch -gnateG
-
+
* switch-m.adb (Normalize_Compiler_Switches): Normalize switch -gnateG
-
+
* ug_words: Add VMS equivalent for -gnateG
-
+
* vms_data.ads:
Add VMS option /GENERATE_PROCESSED_SOURCE, equivalent to switch -gnateG
@@ -1561,9 +1567,9 @@
2008-08-04 Vincent Celier <celier@adacore.com>
* prj-attr.adb: New Builder attribute Global_Compilation_Switches
-
+
* snames.adb: New standard name Global_Compilation_Switches
-
+
* snames.ads: New standard name Global_Compilation_Switches
* make.adb: Correct spelling error in comment
@@ -1639,13 +1645,13 @@
2008-08-01 Hristian Kirtchev <kirtchev@adacore.com>
* rtsfind.ads: Add block IO versions of stream routines for Strings.
-
+
* bindgen.adb, gnat_rm.texi, gnat_ugn.texi, opt.ads,
sem_prag.adb, snames.adb, snames.ads, snames.h,
par-prag.adb: Undo previous stream related changes.
-
+
* 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
@@ -1657,7 +1663,7 @@
Otherwise use the corresponding block IO version.
2008-08-01 Olivier Hainque <hainque@adacore.com>
-
+
* gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Function>: Do not
turn Ada Pure into GCC const, now implicitely implying nothrow as well.
@@ -1726,9 +1732,9 @@
2008-08-01 Vincent Celier <celier@adacore.com>
* prj-attr.adb: New attribute Compiler'Name_Syntax (<lang>)
-
+
* prj-nmsc.adb (Process_Compiler): Recognize attribute Name_Syntax
-
+
* prj.adb (Object_Exist_For): Use Object_Generated, not
Objects_Generated that is removed and was never modified anyway.
@@ -1739,7 +1745,7 @@
used.
* snames.adb: New standard name Path_Syntax
-
+
* snames.ads: New standard name Path_Syntax
2008-08-01 Vincent Celier <celier@adacore.com>
@@ -1749,7 +1755,7 @@
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
2008-08-01 Ed Schonberg <schonberg@adacore.com>
@@ -1815,7 +1821,7 @@
2008-08-01 Doug Rupp <rupp@adacore.com>
* gnat_rm.texi: Document new mechanism Short_Descriptor.
-
+
* types.ads (Mechanism_Type): Modify range for new Short_Descriptor
mechanism values.
@@ -1850,7 +1856,7 @@
* 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.
+ (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
@@ -1906,7 +1912,7 @@
* mlib-tgt-specific-vms-alpha.adb (Build_Dynamic_Library): Output a
dummy transfer address for debugging.
-
+
* mlib-tgt-specific-vms-ia64.adb (Build_Dynamic_Library): Likewise.
* vms_data.ads: vms_data.ads: New qualfier /MACHINE_CODE_LISTING
@@ -1924,7 +1930,7 @@
* system-rtx-rtss.ads
Change the default stack size. It is important to set the commit part.
-
+
* s-taprop-rtx.adb
(Initialize): Get the clock resolution.
(RT_Resolution): Return the clock resolution that is indicated by the
@@ -1987,32 +1993,32 @@
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.
@@ -2030,17 +2036,17 @@
2008-07-31 Gary Dismukes <dismukes@adacore.com>
* checks.ads (Apply_Accessibility_Check): Add parameter Insert_Node.
-
+
* checks.adb (Apply_Accessibility_Check): Insert the check on
Insert_Node.
-
+
* exp_attr.adb:
(Expand_N_Attribute_Refernce, Attribute_Access): Pass attribute node
to new parameter Insert_Node on call to Apply_Accessibility_Check.
Necessary to distinguish the insertion node because the dereferenced
formal may come from a rename, but the check must be inserted in
front of the attribute.
-
+
* exp_ch4.adb:
(Expand_N_Allocator): Pass actual for new Insert_Node parameter on
call to Apply_Accessibility_Check.
@@ -2052,15 +2058,15 @@
* sem_type.adb (Has_Compatible_Type): Complete support for synchronized
types when the candidate type is a synchronized type.
-
+
* sem_res.adb (Resolve_Actuals): Reorganize code handling synchronized
types, and complete management of synchronized types adding missing
code to handle formal that is a synchronized type.
-
+
* sem_ch4.adb (Try_Primitive_Operation): Avoid testing attributes that
are not available and cause the compiler to blowup. Found compiling
test with switch -gnatc
-
+
* sem_ch6.adb (Check_Synchronized_Overriding): Remove local subprogram
Has_Correct_Formal_Mode plus code cleanup.
@@ -2128,7 +2134,7 @@
* exp_attr.adb (Find_Stream_Subprogram): Check the base type instead
of the type when looking for stream subprograms for type String,
Wide_String and Wide_Wide_String.
-
+
* s-ststop.adb: Change the initialization expression of constant
Use_Block_IO.
@@ -2173,9 +2179,9 @@
2008-07-31 Robert Dewar <dewar@adacore.com>
* einfo.adb (Spec_PPC): Now defined for generic subprograms
-
+
* einfo.ads (Spec_PPC): Now defined for generic subprograms
-
+
* sem_prag.adb (Check_Precondition_Postcondition): Handle generic
subprogram case
@@ -2190,7 +2196,7 @@
they will appear in each instance.
(Process_PPCs): Do not transform postconditions into a procedure in a
generic context, to prevent double expansion of check pragmas.
-
+
* sem_attr.adb: In an instance, the prefix of the 'result attribute
can be the renaming of the
current instance, so check validity of the name accordingly.
@@ -2205,7 +2211,7 @@
from context. This attribute must be usable in Ada95 mode.
The attribute can appear in the body of a function marked
Inline_Always, but in this case the postocondition is not enforced.
-
+
sem_prag.adb (Check_Precondition_Postcondition): within the expansion
of an inlined call pre- and postconditions are legal
@@ -2231,7 +2237,7 @@
2008-07-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
- * gcc-interface/Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS)
+ * gcc-interface/Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS)
[WINDOWS]: Add s-winext.o.
2008-07-30 Eric Botcazou <ebotcazou@adacore.com>
@@ -2290,7 +2296,7 @@
* sem_ch8.adb (Analyze_Subprogram_Renaming): When renaming an attribute
as a actual in an instance, check for a missing attribute to prevent
program_error on an illegal program.
-
+
* exp_util.adb (Find_Prim_Op): Rather than Assert (False), raise program
error if primitive is not found, so that exception can be handled
elsewhere on illegal programs.
@@ -2341,7 +2347,7 @@
(Process_Full_View): Build wrapper specs for all primitives
that belong to a private view completed by a concurrent type
implementing an interface.
-
+
* sem_ch6.adb (Analyze_Subprogram_Body): When the current subprogram
is a primitive of a
concurrent type with a private view that implements an interface, try to
@@ -2395,18 +2401,18 @@
* cio.c
(put_int, put_int_stderr, put_char, put_char_stderr): For RTX we call
the function RtPrintf for console output.
-
+
* argv.c Do not use the environ variable for RTX.
-
+
* gnatlink.adb (gnatlink): The part that handles the --RTS option has
been moved before the call to Osint.Add_Default_Search_Dirs in order
to take into account the flags in system.ads (RTX_RTSS_Kernel_Module)
from the appropriate run time.
-
+
* targparm.ads
(RTX_RTSS_Kernel_Module_On_Target): Add this flag that is set to True if
target is a RTSS module for RTX.
-
+
* targparm.adb (Targparm_Tags, RTX_Str, Targparm_Str): Add tag RTX for
RTX_RTSS_Kernel_Module
(Get_Target_Parameters): Add processing of RTX_RTSS_Kernel_Module flag.
@@ -2433,13 +2439,13 @@
2008-07-30 Laurent Guerby <laurent@guerby.net>
- PR ada/5911
- * gcc-interface/Makefile.in (MULTISUBDIR, RTSDIR): New variables.
- Pass MULTISUBDIR to recursive make. Use $(RTSDIR) instead of rts.
- Replace stamp-gnatlib* by stamp-gnatlib*-rts.
- * gcc-interface/Make-lang.in: Replace stamp-gnatlib2
- by stamp-gnatlib2-rts.
-
+ PR ada/5911
+ * gcc-interface/Makefile.in (MULTISUBDIR, RTSDIR): New variables.
+ Pass MULTISUBDIR to recursive make. Use $(RTSDIR) instead of rts.
+ Replace stamp-gnatlib* by stamp-gnatlib*-rts.
+ * gcc-interface/Make-lang.in: Replace stamp-gnatlib2
+ by stamp-gnatlib2-rts.
+
2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR documentation/15479
@@ -2531,7 +2537,7 @@
* adaint.c (__MINGW32__ section): Include ctype.h and define
a fallback ISALPHA if IN_RTS.
- (__gnat_is_absolute_path): Use ISALPHA instead of isalpha.
+ (__gnat_is_absolute_path): Use ISALPHA instead of isalpha.
2008-07-17 Olivier Hainque <hainque@adacore.com>
@@ -2604,7 +2610,7 @@
(gnat_to_gnu_entity) <case E_Function/Procedure>: Request stack
realignment with force_align_arg_pointer attribute on foreign
convention subprograms if FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN.
-
+
2008-06-13 Olivier Hainque <hainque@adacore.com>
* utils.c (rest_of_record_type_compilation): When computing
@@ -2667,7 +2673,7 @@
(gnat_handle_option) <OPT_gdwarf_>: Increment gnat_dwarf_extensions.
(gnat_post_options): Map gnat_dwarf_extensions to the
commonuse_gnu_debug_info_extensions for later processing.
-
+
2008-06-04 Samuel Tardieu <sam@rfc1149.net>
* einfo.ads, einfo.adb: Remove unused flag Function_Returns_With_DSP.
@@ -2701,9 +2707,9 @@
PR ada/864
* osint.ads, osint.adb (Program_Name): New parameter "Prog" to
allow recognition of program suffix in addition to prefix.
-
+
* gnatchop.adb (Locate_Executable): Add support for prefix.
-
+
* make.adb, gnatcmd.adb, gnatlink.adb, prj-makr.adb,
mlib-utl.adb: Adjust calls to Program_Name.
@@ -2750,7 +2756,7 @@
* sinput-p.adb (Source_File_Is_Subunit): Allow special character used
for preprocessing
-
+
* sinput-p.ads: Minor comment update and reformatting
2008-05-28 Ed Schonberg <schonberg@adacore.com>
@@ -2780,18 +2786,18 @@
* restrict.ads:
Add missing restrictions, and properly label all GNAT defined ones
-
+
* rtsfind.ads:
Add entry for Ada_Real_Time.Timing_Events.Timing_Event
Add entry for Ada.Task_Termination.Set_Specific_Handler
Add entry for Ada.Task_Termination.Specific_Handler
-
+
* s-rident.ads:
Add missing restrictions and properly mark all gnat defined ones
-
+
* sem_ch3.adb:
(Analyze_Object_Declaration): Check No_Local_Timing_Events restriction
-
+
* sem_res.adb:
(Resolve_Call): Check violation of No_Specific_Termination_Handlers
@@ -2841,7 +2847,7 @@
* sem_ch3.adb (Derive_Progenitor_Primitives): Add missing support
for user-defined predefined primitives.
-
+
* sem_util.adb (Matches_Prefixed_View_Profile): Ditto.
(Find_Overridden_Synchronized_Primitive): Ditto.
@@ -2930,7 +2936,7 @@
2008-05-27 Arnaud Charlet <charlet@adacore.com>
* bindgen.adb: Update comments.
-
+
* s-tasinf-mingw.adb: Add "with" of System.OS_Interface
2008-05-27 Vincent Celier <celier@adacore.com>
@@ -2974,14 +2980,14 @@
Measure and Overflow_Guard.
(Report_Result): Fixed computation of the result using new fields of
Stack_Analyzer.
-
+
* s-stausa.ads (Initialize_Analyzer): Replaced Size / Overflow_Guard
params by more explicit Stack_Size / Max_Pattern_Size params.
(Stack_Analyzer): Added distinct Stack_Size & Pattern_Size fields.
Added Stack_Used_When_Filling field.
(Task_Result): Replaced Measure / Overflow_Guard by more explicit
Min_Measure and Max_Measure fields.
-
+
* s-tassta.adb (Task_Wrapper): Updated call to Initialize_Analyzer.
2008-05-27 Vincent Celier <celier@adacore.com>
@@ -3001,7 +3007,7 @@
(System.File_IO.{Close, Delete, Reset}):
Change File parameter from "in out AFCB_Ptr" to "access AFCB_Ptr".
-
+
(Ada.*_IO.{Close, Delete, Reset, Set_Mode}):
Pass File parameter by reference.
@@ -3053,7 +3059,7 @@
* system-solaris-sparc.ads (Always_Compatible_Rep): Likewise.
* system-solaris-sparcv9.ads (Always_Compatible_Rep): Likewise.
* system-solaris-x86.ads (Always_Compatible_Rep): Likewise.
-
+
2008-05-27 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb: add guard to previous patch.
@@ -3080,14 +3086,14 @@
2008-05-27 Vincent Celier <celier@adacore.com>
* prj-attr.adb: Add new project level attribute Map_File_Option
-
+
* prj-nmsc.adb (Process_Linker): Process new attribute Map_File_Option
-
+
* prj.ads: Minor reformatting and comment update
(Project_Configuration): New component Map_File_Option
-
+
* snames.adb: New standard name Map_File_Option
-
+
* snames.ads: New standard name Map_File_Option
2008-05-27 Vincent Celier <celier@adacore.com>
@@ -3111,7 +3117,7 @@
* exp_ch3.adb (Expand_N_Object_Declaration): Remove checks for
No_Default_Initialization, which is now delayed until the freeze point
of the object. Add a comment about deferral of the check.
-
+
* freeze.adb (Freeze_Entity): The check for No_Default_Initialization
on objects is moved here.
@@ -3129,7 +3135,7 @@
(Compare_Array_U32): Likewise.
* s-caun64.adb (Uword): Likewise.
(Compare_Array_U64): Likewise.
-
+
2008-05-26 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb: Add ??? comment for previous change
@@ -3198,7 +3204,7 @@
* rtsfind.ads, rtsfind.adb:
(RE_Get_RACW): New runtime library entity provided by PolyORB s-parint.
(Check_RPC): Support per-PCS-kind API versioning.
-
+
exp_dist.ads, exp_dist.adb:
(Build_Stub_Tag, Get_Stub_Elements): New utility subprograms.
(PolyORB_Support.Add_RACW_From_Any): Offload common code to new runtime
@@ -3209,7 +3215,7 @@
through an intermediate Any.
(PolyORB_Support.Add_RACW_Write_Attribute): Use Get_Reference instead of
going through an intermediate Any.
-
+
* sem_dist.adb: Minor reformatting.
2008-05-26 Javier Miranda <miranda@adacore.com>
@@ -3480,7 +3486,7 @@
respectively.
Hence, the priority must be set in this case to the one selected by the
user.
-
+
2008-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb:
@@ -3488,7 +3494,7 @@
parent is declared within some parent scope of the just completed
instance, make full views of the entities in that parent visible, when
applicable.
-
+
2008-05-26 Kai Tietz <kai.tietz@onevision.com>
* mingw32.h (STD_MINGW): Set to true for target w64.
@@ -3580,12 +3586,12 @@
* g-sttsne-vxworks.adb: Add missing dependency on Sockets.Constants.
Add missing "with" of Ada.Unchecked_Conversion
- * g-soccon-linux-ppc.ads, g-soccon-linux-64.ads, g-soccon-lynxos.ads,
- g-soccon-linux-x86.ads, g-soccon-hpux-ia64.ads,
- g-soccon-solaris-64.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
- g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
- g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-vxworks.ads,
- g-socthi-vxworks.adb, g-soccon-freebsd.ads, g-soccon.ads:
+ * g-soccon-linux-ppc.ads, g-soccon-linux-64.ads, g-soccon-lynxos.ads,
+ g-soccon-linux-x86.ads, g-soccon-hpux-ia64.ads,
+ g-soccon-solaris-64.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
+ g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
+ g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-vxworks.ads,
+ g-socthi-vxworks.adb, g-soccon-freebsd.ads, g-soccon.ads:
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.
New constant SIZEOF_fd_set
@@ -3596,13 +3602,13 @@
(Create): Remove call to Set_Length; use Set_Family to set the family
and (on appropriate platforms) length fields in struct sockaddr.
- * g-socthi.adb, g-socthi.ads, g-socthi-vms.ads, g-socthi-vms.adb,
- g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.adb,
+ * g-socthi.adb, g-socthi.ads, g-socthi-vms.ads, g-socthi-vms.adb,
+ g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.adb,
g-soccon-darwin.ads, g-soccon-darwin.ads: New constant SIZEOF_fd_set
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.
- * g-socket.ads, g-socket.adb:
+ * g-socket.ads, g-socket.adb:
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.
(Connect_Socket, Accept_Socket): Provide new versions of these two
@@ -3611,7 +3617,7 @@
this is now handled automatically by Set_Family on platforms that
require it.
- * gen-soccon.c:
+ * gen-soccon.c:
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.
(SIZEOF_sockaddr_in6): On platforms where IPv6 is not supported, define
@@ -3722,7 +3728,7 @@
Declared_In_Interfaces.
(Project_Data): New Boolean component Interfaces_Defined
- * prj-attr.adb:
+ * prj-attr.adb:
New project level attribute Object_Generated and Objects_Linked
Add new project level attribute Interfaces
@@ -3731,13 +3737,13 @@
name and is not found in the current project, look for it also in the
ancestors of the project.
- * prj-makr.adb:
+ * prj-makr.adb:
Replace procedure Make with procedures Initialize, Process and Finalize
to implement H414-023: process different directories with different
patterns.
Use functions Present and No throughout
- * prj-makr.ads:
+ * prj-makr.ads:
Replace procedure Make with procedures Initialize, Process and Finalize
* prj-nmsc.adb
@@ -3795,7 +3801,7 @@
(Parent_Project_Of): New function
(Set_Parent_Project_Of): New procedure
- * snames.ads, snames.adb:
+ * snames.ads, snames.adb:
Add new standard names Object_Generated and Objects_Linked
2008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
@@ -3839,7 +3845,7 @@
Calls to access and assign routines have been replaced by calls to
Read/Write routines of System.Shared_Storage.Shared_Var_Procs
instantiated package.
-
+
* rtsfind.ads: RE_Shared_Var_Procs entry has been added in RE_Unit_Table
It identifies the new generic package added in s-shasto.
@@ -4070,7 +4076,7 @@
* s-osinte-irix.ads: (Alternate_Stack_Size): Add dummy declaration.
- * adaint.c:
+ * adaint.c:
Don't define dummy implementation of convert_addresses on ppc-linux.
2008-05-20 Ed Schonberg <schonberg@adacore.com>
@@ -4112,7 +4118,7 @@
(gnat_to_gnu) <N_Validate_Unchecked_Conversion>: Fix formatting.
2008-05-14 Samuel Tardieu <sam@rfc1149.net>
- Robert Dewar <dewar@adacore.com>
+ Robert Dewar <dewar@adacore.com>
* sem_attr.adb (Analyze_Attribute, Attribute_Old case): Add
restrictions to the prefix of 'Old.
@@ -4129,7 +4135,7 @@
directly in a couple of special cases.
2008-05-12 Samuel Tardieu <sam@rfc1149.net>
- Ed Schonberg <schonberg@adacore.com>
+ Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Record_Type): Accept statically matching
constraint expressions.
@@ -4189,7 +4195,7 @@
tagged type by an untagged protected or task type.
2008-04-28 Eric Botcazou <ebotcazou@adacore.com>
- Tristan Gingold <gingold@adacore.com>
+ Tristan Gingold <gingold@adacore.com>
PR ada/36007
* decl.c (gnat_to_gnu_entity) <object>: Do not promote alignment
@@ -4316,7 +4322,7 @@
the parent using the corresponding discriminant.
2008-04-15 Samuel Tardieu <sam@rfc1149.net>
- Gary Dismukes <dismukes@adacore.com>
+ Gary Dismukes <dismukes@adacore.com>
PR ada/28733
* sem_ch8.adb (Analyze_Use_Package): Do not allow "use" of something
@@ -4413,7 +4419,7 @@
* xref_lib.adb (Parse_Identifier_Info): Correctly parse and ignore the
renaming information.
-2008-04-13 Samuel Tardieu <sam@rfc1149.net>
+2008-04-13 Samuel Tardieu <sam@rfc1149.net>
PR ada/17985
* sem_aggr.adb (Valid_Ancestor_Type): A type is not an ancestor of
@@ -4581,7 +4587,7 @@
* utils.c (gnat_genericize): Likewise.
2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
- Richard Kenner <kenner@adacore.com>
+ Richard Kenner <kenner@adacore.com>
* ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Only set it when bit-packed.
* decl.c (gnat_to_gnu_entity): Adjust for above change.
@@ -4640,7 +4646,7 @@
* g-sercom-linux.adb:
Implement the stop bits and parity support for GNU/Linux.
Fix handling of timeout, it must be given in tenth of seconds.
-
+
* g-sercom-mingw.adb:
Implement the stop bits and parity support for Windows.
Use new s-win32.ads unit instead of declaring Win32 services
@@ -4696,7 +4702,7 @@
* system-linux-x86.ads: (Stack_Check_Probes): Set to True.
- * s-intman-posix.adb:
+ * s-intman-posix.adb:
(Initialize): Set SA_ONSTACK for SIGSEGV if the platform makes use of an
alternate signal stack for stack overflows.
@@ -4738,7 +4744,7 @@
(s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads,
s-vxwext-rtp.adb): New files.
- * s-taprop-vxworks.adb, s-osinte-vxworks.ads, s-osinte-vxworks.adb:
+ * s-taprop-vxworks.adb, s-osinte-vxworks.ads, s-osinte-vxworks.adb:
Minor updates to accomodate changes above.
2008-04-08 Pascal Obry <obry@adacore.com>
@@ -4747,10 +4753,10 @@
s-tasinf-mingw.ad{s,b}, s-taspri-mingw.ads:
Use new s-win32.ads unit instead of declaration
from s-osinte-mingw.ads.
-
+
* s-osinte-mingw.ads:
Move all non tasking based interface to s-win32.ads.
-
+
* s-osprim-mingw.adb:
Remove duplicated declarations and use s-win32.ads
unit instead.
@@ -4773,7 +4779,7 @@
mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb,
mlib-tgt-specific-mingw.adb: New names.
- * Makefile.in:
+ * Makefile.in:
On VxWorks platforms use s-stchop-limit.ads for s-stchop.ads
Get rid of gnatbl.
(EXTRA_GNATRTL_NONTASKING_OBJS): Add s-win32.o
@@ -4797,7 +4803,7 @@
* a-cgcaso.adb, a-convec.adb: (Swap, Sift): Avoid use of complex
renaming.
- * a-cgaaso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads,
+ * a-cgaaso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads,
a-crdlli.ads, a-coormu.ads, a-ciormu.ads: modified header to conform
to convention for non-RM specs.
Add descriptive header, and documented each operation
@@ -5315,7 +5321,7 @@ PR ada/10768
* fname-sf.adb: Remove Big_String declarations (now in Types)
* s-strcom.adb, g-dyntab.ads, g-table.ads, s-carsi8.adb,
- s-stalib.ads, s-carun8.adb: Add zero size Storage_Size clauses for
+ s-stalib.ads, s-carun8.adb: Add zero size Storage_Size clauses for
big pointer types
* table.ads: Add for Table_Ptr'Storage_Size use 0
@@ -5342,7 +5348,7 @@ PR ada/10768
* makeusg.adb: Add line for switch --subdirs=
- * prj.ads:
+ * prj.ads:
(Source_Data): New Boolean component Compiled, defaulted to True
(Empty_File_Name: New global variable in private part, initialized in
procedure Initialize.
@@ -5415,7 +5421,7 @@ PR ada/10768
* prj-proc.adb (Process_Declarative_Items): Link new elements of copied
full associative array together.
(Recursive_Process): Put the project qualifier in the project data
-
+
* prj-tree.ads, prj-tree.adb: (Project_Qualifier_Of): New function
(Set_Project_Qualifier_Of): New procedure
@@ -5583,7 +5589,7 @@ PR ada/10768
* s-rident.ads: Add No_Default_Initialization restriction
- * exp_tss.adb:
+ * exp_tss.adb:
(Has_Non_Null_Base_Init_Proc): Handle No_Default_Initialization case
(Set_TSS): Handle No_Default_Initialization case
@@ -6083,15 +6089,15 @@ PR ada/10768
ilasm.
2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
- Xavier Grave <grave@ipno.in2p3.fr>
+ Xavier Grave <grave@ipno.in2p3.fr>
* Makefile.in: Add make ifeq define for mips/mipsel support.
- * g-soccon-linux-mips.ads, system-linux-mipsel.ads,
+ * g-soccon-linux-mips.ads, system-linux-mipsel.ads,
system-linux-mips.ads: New files.
2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
- * sysdep.c: add __GLIBC__ to the #ifdef preprocessor macros to
+ * sysdep.c: add __GLIBC__ to the #ifdef preprocessor macros to
detect systems using GNU libc.
* gsocket.h: ditto.
* socket.c: ditto.
@@ -6100,7 +6106,7 @@ PR ada/10768
2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
- * s-osinte-linux-kfreebsd.ads (SC_NPROCESSORS_ONLN): New
+ * s-osinte-linux-kfreebsd.ads (SC_NPROCESSORS_ONLN): New
constant constant for sysconf call.
(bit_field): New packed boolean type used by cpu_set_t.
(cpu_set_t): New type corresponding to the C type with
@@ -6196,7 +6202,7 @@ PR ada/10768
size if it has overflowed.
2008-03-31 Olivier Hainque <hainque@adacore.com>
- Eric Botcazou <ebotcazou@adacore.com>
+ Eric Botcazou <ebotcazou@adacore.com>
* utils2.c (find_common_type): Document assumption on t1/t2 vs
lhs/rhs. Force use of lhs type if smaller, whatever the modes.
@@ -6334,8 +6340,8 @@ PR ada/10768
2008-03-26 Arnaud Charlet <charlet@adacore.com>
- * s-taprop-irix.adb, s-taprop-tru64.adb, s-taprop-lynxos.adb,
- s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-vxworks.adb,
+ * s-taprop-irix.adb, s-taprop-tru64.adb, s-taprop-lynxos.adb,
+ s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-vxworks.adb,
s-taprop-posix.adb (Create_Task): Do not attempt to set task priority
or task info if the thread could not be created.
@@ -6648,15 +6654,15 @@ PR ada/10768
* Makefile.in: Add proper GNAT.Serial_Communications implementation on
supported platforms.
-
+
* Makefile.rtl: Add g-sercom.o.
-
+
* impunit.adb: Add g-sercom.adb.
-
+
* s-crtl.ads (open): New routine.
(close): Likewise.
(write): Likewise.
-
+
* s-osinte-mingw.ads (BYTE): New type.
(CHAR): Likewise.
(OVERLAPPED): Likewise.
@@ -6674,7 +6680,7 @@ PR ada/10768
* g-sercom.adb: Default implementation, calls to this unit will raise
a program error exception.
-
+
* g-sercom-mingw.adb, g-sercom-linux.adb: Windows and
GNU/Linux implementations.
@@ -6764,7 +6770,7 @@ PR ada/10768
declarations of a parent unit are made visible when compiling a child
instance, the parent is not a hidden open scope, even though it may
contain other pending instance.
-
+
* sem_ch8.adb (Restore_Scope_Stack): If an entry on the stack is a
hidden open scope for some child instance, it does affect the
visibility status of other stach entries.
@@ -6794,7 +6800,7 @@ PR ada/10768
2008-03-26 Matthew Heaney <heaney@adacore.com>
- * a-ciorse.ads, a-cidlli.ads, a-cdlili.ads, a-cihase.ads, a-cohase.ads,
+ * a-ciorse.ads, a-cidlli.ads, a-cdlili.ads, a-cihase.ads, a-cohase.ads,
a-ciorma.ads, a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-coorse.ads:
Marked with clauses as private, and controlled operations as overriding
@@ -6951,7 +6957,7 @@ PR ada/10768
* trans.c (addressable_p): Add notes on addressability issues.
2008-03-21 Olivier Hainque <hainque@adacore.com>
- Ed Schonberg <schonberg@adacore.com>
+ Ed Schonberg <schonberg@adacore.com>
* trans.c (addressable_p): Accept COND_EXPR when both arms
are addressable.
@@ -7272,7 +7278,7 @@ PR ada/10768
2007-12-19 Robert Dewar <dewar@adacore.com>
- * g-expect-vms.adb, g-expect.adb, s-poosiz.adb:
+ * g-expect-vms.adb, g-expect.adb, s-poosiz.adb:
Add pragma Warnings (Off) for unassigned IN OUT arguments
* sem_warn.adb (Output_Reference): Suppress messages for internal names
@@ -7341,7 +7347,7 @@ PR ada/10768
* errout.adb (First_Node): Use Traverse_Proc instead of Traverse_Func,
because the former already takes care of discarding the result.
(Remove_Warning_Messages): Use appropriate subtype for Status and
- Discard
+ Discard
2007-12-19 Ed Schonberg <schonberg@adacore.com>
@@ -7501,7 +7507,7 @@ PR ada/10768
* adaint.c (__gnat_pthread_setaffinity_np): New routine. A dummy
version is provided for older GNU/Linux distribution not
supporting thread affinity sets.
-
+
* s-osinte-linux.ads (SC_NPROCESSORS_ONLN): New constant for sysconf
call.
(bit_field): New packed boolean type used by cpu_set_t.
@@ -7510,23 +7516,23 @@ PR ada/10768
field array for the affinity mask. There is not need
for the C macro for setting individual bit.
(pthread_setaffinity_np): New imported routine.
-
+
* s-taprop-linux.adb (Enter_Task): Check that the CPU affinity mask is
no null.
(Create_Task): Set the processor affinity mask if information
is present.
-
+
* s-tasinf-linux.ads, s-tasinf-linux.adb: New files.
-
+
2007-12-13 Robert Dewar <dewar@adacore.com>
- * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
- s-osinte-freebsd.ads, s-osinte-lynxos.ads, s-osinte-tru64.ads,
- s-osinte-mingw.ads, s-osinte-aix.ads, s-osinte-hpux-dce.ads,
+ * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
+ s-osinte-freebsd.ads, s-osinte-lynxos.ads, s-osinte-tru64.ads,
+ s-osinte-mingw.ads, s-osinte-aix.ads, s-osinte-hpux-dce.ads,
s-osinte-irix.ads, s-osinte-solaris.ads, s-intman-vms.adb,
s-osinte-vms.ads, s-osinte-vxworks6.ads, s-osinte-vxworks.ads,
- s-auxdec.ads, s-auxdec-vms_64.ads, s-osinte-darwin.ads,
- s-taprop-vms.adb, s-interr-sigaction.adb, s-osinte-linux-hppa.ads,
+ s-auxdec.ads, s-auxdec-vms_64.ads, s-osinte-darwin.ads,
+ s-taprop-vms.adb, s-interr-sigaction.adb, s-osinte-linux-hppa.ads,
i-vxwork-x86.ads, s-tpopde-vms.ads: Add missing pragma Convention C
for subprogram pointers.
@@ -7550,15 +7556,15 @@ PR ada/10768
Bob Duff <duff@adacore.com>
Tristan Gingold <gingold@adacore.com>
- * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
- system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
- system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
- system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
- system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
- system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
- system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
+ * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
+ system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
+ system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
+ system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
+ system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
+ system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
+ system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
system-vxworks-arm.ads, system-darwin-x86.ads, system.ads,
- system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
+ system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
system-linux-ppc.ads, system-linux-hppa.ads, system-hpux-ia64.ads,
system-vms-ia64.ads (Stack_Check_Limits): New target parameter.
(Always_Compatible_Rep): New flag to control trampolines globally.
@@ -7569,7 +7575,7 @@ PR ada/10768
* s-taprop-vxworks.adb: Use stack limit method of stack checking.
Simply indirectly call s-stchop when a task is created.
- * ali.ads:
+ * ali.ads:
New flag added: Stack_Check_Switch_Set which is set when '-fstack-check'
appears as an argument (entries A) in an ALI file.
@@ -7594,8 +7600,8 @@ PR ada/10768
2007-12-13 Robert Dewar <dewar@adacore.com>
- * sem_ch5.adb, s-taskin.adb, a-ciorma.adb, a-coorma.adb, a-cohama.adb,
- a-cihama.adb, g-awk.adb,
+ * sem_ch5.adb, s-taskin.adb, a-ciorma.adb, a-coorma.adb, a-cohama.adb,
+ a-cihama.adb, g-awk.adb,
s-inmaop-posix.adb: Update handling of assigned value/unreferenced
warnings
@@ -7607,7 +7613,7 @@ PR ada/10768
* lib-xref.ads: Improve documentation for k xref type
- * lib-xref.adb:
+ * lib-xref.adb:
Update handling of assigned value/unreferenced warnings
(Generate_Reference): Warning for reference to entity for which a
pragma Unreferenced has been given should be unconditional.
@@ -7637,7 +7643,7 @@ PR ada/10768
EXTRA_GNATRTL_NONTASKING_OBJS, EXTRA_GNATRTL_TASKING_OBJS,
GNATLIB_SHARED for RTX run time): Use the versions required by RTX.
- * mingw32.h:
+ * mingw32.h:
Do not define GNAT_UNICODE_SUPPORT for RTX since it is not supported.
* sysdep.c (winflush_function for RTX): Procedure that does nothing
@@ -7648,7 +7654,7 @@ PR ada/10768
2007-12-13 Robert Dewar <dewar@adacore.com>
- * a-textio.adb, a-textio.ads:
+ * a-textio.adb, a-textio.ads:
Extensive changes to private part for wide character encoding
* a-witeio.adb, a-witeio.ads, a-ztexio.ads, a-ztexio.adb
@@ -7691,7 +7697,7 @@ PR ada/10768
* opt.adb: New pragma Fast_Math
- * par-prag.adb:
+ * par-prag.adb:
Add Implemented_By_Entry to the list of pragmas which do not require any
special processing.
(Favor_Top_Level): New pragma.
@@ -7732,7 +7738,7 @@ PR ada/10768
New pragma Fast_Math
(Analyze_Pragma, case No_Return): Handle generic instance
- * snames.h, snames.ads, snames.adb:
+ * snames.h, snames.ads, snames.adb:
Add new predefined name for interface primitive _Disp_Requeue.
New pragma Fast_Math
@@ -7772,7 +7778,7 @@ PR ada/10768
2007-12-13 Geert Bosch <bosch@adacore.com>
- * a-tifiio.adb:
+ * a-tifiio.adb:
(Put_Int64): Use Put_Digit to advance Pos. This fixes a case where
the second or later Scaled_Divide would omit leading zeroes,
resulting in too few digits produced and a Layout_Error as result.
@@ -7800,7 +7806,7 @@ PR ada/10768
(Find_Interface_ADT): Modified to fulfill the new specification.
Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
- * par-ch4.adb, nlists.ads, nlists.adb:
+ * par-ch4.adb, nlists.ads, nlists.adb:
Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
* sinfo.ads, sinfo.adb: (Nkind_In): New functions
@@ -7810,7 +7816,7 @@ PR ada/10768
2007-12-13 Vincent Celier <celier@adacore.com>
- * opt.ads:
+ * opt.ads:
Indicate what flags are used by the Project Manager, gprbuild and
gprclean.
(Opt.Follow_Links_For_Dirs): New flag
@@ -7842,7 +7848,7 @@ PR ada/10768
passing a pointer to a procedure. This is to eliminate trampolines
(since the Callback procedure is usually nested).
- * gnatfind.adb, switch.adb, switch.ads, gnatlink.adb, gnatls.adb,
+ * gnatfind.adb, switch.adb, switch.ads, gnatlink.adb, gnatls.adb,
gnatname.adb, gnatxref.adb, gnatchop.adb, gprep.adb, gnatbind.adb
(Check_Version_And_Help): Change Check_Version_And_Help to be generic.
@@ -8090,7 +8096,7 @@ PR ada/10768
* g-speche.adb: Use generic routine in g-spchge
- * s-wchcnv.ads, s-wchcnv.adb:
+ * s-wchcnv.ads, s-wchcnv.adb:
Minor code cleanup (make formal type consistent with spec)
* namet.adb: Update comments.
@@ -8221,7 +8227,7 @@ PR ada/10768
* prj-pars.adb: new parameter Current_Dir
- * prj-part.ads, prj-part.adb:
+ * prj-part.ads, prj-part.adb:
Change Opt.Follow_Links to Opt.Follow_Links_For_Files.
(Opt.Follow_Links_For_Dirs): New flag
(Project_Path_Name_Of): Cache information returned by this routine as
@@ -8294,10 +8300,10 @@ PR ada/10768
* s-imenne.adb, s-imenne.ads: New files.
- * s-imgboo.adb, s-imgboo.ads, s-imgcha.adb, s-imgcha.ads, s-imgdec.adb,
- s-imgdec.ads, s-imgenu.ads, s-imgint.adb, s-imgint.ads, s-imglld.adb,
- s-imglld.ads, s-imglli.adb, s-imglli.ads, s-imgllu.adb, s-imgllu.ads,
- s-imgrea.adb, s-imgrea.ads, s-imguns.adb, s-imguns.ads, s-imgwch.adb,
+ * s-imgboo.adb, s-imgboo.ads, s-imgcha.adb, s-imgcha.ads, s-imgdec.adb,
+ s-imgdec.ads, s-imgenu.ads, s-imgint.adb, s-imgint.ads, s-imglld.adb,
+ s-imglld.ads, s-imglli.adb, s-imglli.ads, s-imgllu.adb, s-imgllu.ads,
+ s-imgrea.adb, s-imgrea.ads, s-imguns.adb, s-imguns.ads, s-imgwch.adb,
s-imgwch.ads: New calling sequence for Image routines to avoid sec
stack usage.
@@ -8462,7 +8468,7 @@ PR ada/10768
2007-12-13 Arnaud Charlet <charlet@adacore.com>
- * s-tassta.adb:
+ * s-tassta.adb:
(Create_Task): Take into account tasks created by foreign threads.
Code clean up: use constants instead of hard coded values.
@@ -8488,7 +8494,7 @@ PR ada/10768
2007-12-13 Robert Dewar <dewar@adacore.com>
- * tbuild.ads, tbuild.adb:
+ * tbuild.ads, tbuild.adb:
Fix location of flag for unrecognized pragma message
2007-12-13 Robert Dewar <dewar@adacore.com>
@@ -8531,7 +8537,7 @@ PR ada/10768
* sem_case.adb: Minor reformatting
* s-fileio.adb: Minor reformattinng
* s-vmexta.ads: Minor typo
- * vxaddr2line.adb:
+ * vxaddr2line.adb:
Take into account 'Success' value as per new GNAT warning.
2007-12-13 Vincent Celier <celier@adacore.com>
@@ -8620,7 +8626,7 @@ PR ada/10768
2007-12-13 Geert Bosch <bosch@adacore.com>
- * s-parame-vxworks.adb:
+ * s-parame-vxworks.adb:
Update comments to reflect usage of this package by Nucleus.
2007-12-13 Arnaud Charlet <charlet@adacore.com>
@@ -8658,7 +8664,7 @@ PR ada/10768
* decl.c (gnat_to_gnu_entity) <case E_Access_Type>: When computing
the designated full view, only follow a second level Full_View link
for Non_Limited_Views of from_limited_with references.
-
+
2007-12-07 Samuel Tardieu <sam@rfc1149.net>
PR ada/15805
@@ -8705,12 +8711,12 @@ PR ada/10768
parameters of an entry call.
2007-12-03 Robert Dewar <dewar@adacore.com>
- Samuel Tardieu <sam@rfc1149.net>
+ Samuel Tardieu <sam@rfc1149.net>
PR ada/34287
* sem_util.adb (Safe_To_Capture_Value): Do not capture values
of variables declared in a library-level package.
-
+
2007-12-02 Samuel Tardieu <sam@rfc1149.net>
* clean.adb (Clean_Library_Directory): Use Empty_String'Access intead
@@ -8764,10 +8770,10 @@ PR ada/10768
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
- PR 34081/C++
- * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
- Pass 'false' for the new allocate_struct_function parameter.
- * utils.c (build_function_stub): Likewise.
+ PR 34081/C++
+ * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
+ Pass 'false' for the new allocate_struct_function parameter.
+ * utils.c (build_function_stub): Likewise.
2007-11-25 Richard Guenther <rguenther@suse.de>
@@ -8830,7 +8836,7 @@ PR ada/10768
here to ...
* trans.c (gnat_to_gnu) <case N_Free_Statement>: ... here, and don't
expect a super-aligned address for a fat or thin pointer.
-
+
2007-11-14 Eric Botcazou <ebotcazou@adacore.com>
* trans.c (call_to_gnu): Always set the source location on the call
@@ -8932,21 +8938,21 @@ PR ada/10768
2007-10-15 Robert Dewar <dewar@adacore.com>
- * s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
+ * s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
s-taprop-vxworks.adb, s-taprop-posix.adb, a-calend-vms.adb,
- a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb,
- checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb,
- freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb,
- gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb,
- mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb,
- prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb,
- sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb,
+ a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb,
+ checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb,
+ freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb,
+ gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb,
+ mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb,
+ prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb,
+ sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb,
s-tassta.adb, s-tpobop.adb, s-tposen.adb, stylesw.adb, types.ads,
- uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb,
- a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb,
- a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb,
- a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb,
- a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb,
+ uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb,
+ a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb,
+ a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb,
+ a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb,
+ a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb,
a-calari.adb, a-calfor.adb, s-os_lib.adb, s-regpat.adb, a-ngrear.adb:
Minor reformatting.
Add Unreferenced and Warnings (Off) pragmas for cases of
@@ -8954,7 +8960,7 @@ PR ada/10768
the resulting values are not subsequently referenced. In a few cases,
we also remove redundant code found by the new warnings.
- * ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads,
+ * ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads,
sem_warn.adb, sem_warn.ads, sem_res.adb, sem_ch7.adb, sem_ch8.adb,
sem_ch5.adb, opt.ads, lib-xref.adb, lib-xref.ads, exp_smem.adb,
sem_ch11.adb, exp_ch6.adb, einfo.ads, einfo.adb: implement a new
@@ -9189,7 +9195,7 @@ PR ada/10768
* g-soccon-vms.ads: Fix value of MSG_WAITALL.
- * gen-soccon.c:
+ * gen-soccon.c:
Update documentation to note that OpenVMS 8.3 or later must be used
to generate g-soccon-vms.ads.
@@ -9280,13 +9286,13 @@ PR ada/10768
2007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
- * a-calend-vms.adb, a-calend.adb:
+ * a-calend-vms.adb, a-calend.adb:
Add a section on leap seconds control along with two entities used to
enable and disable leap seconds support. The array Leap_Second_Times is
now constant and contains hard time values pre-generated. Remove
all elaboration code used to populate the table of leap seconds.
- * bindgen.adb:
+ * bindgen.adb:
Add entity Leap_Seconds_Support to the list of global run-time variables
along with a comment on its usage and values.
(Gen_Adainit_Ada): Add code to generate the declaration and import of
@@ -9347,12 +9353,12 @@ PR ada/10768
2007-09-26 Javier Miranda <miranda@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
- * a-tags.adb:
+ * a-tags.adb:
(Get_HT_Link/Set_HT_Link): Updated to handle the additional level of
indirection added to the HT_Link component of the TSD. This is required
to statically allocate the TSD.
- * a-tags.ads:
+ * a-tags.ads:
Minor reordering of the declarations in the private part. Required to
add a level of indirection to the contents of the TSD component HT_Link.
This is required to statically allocate the TSD.
@@ -9425,7 +9431,7 @@ PR ada/10768
of each extra formal of a protected operation to reference the
corresponding extra formal of the subprogram denoted by the
operation's Protected_Body_Subprogram.
-
+
* sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on
N_Function_Call nodes.
@@ -9689,14 +9695,14 @@ PR ada/10768
s-stoele.adb, s-strcom.adb, s-strops.adb, s-traceb.adb, s-traent.adb,
s-wchcnv.adb, s-wchcon.adb, s-wchjis.adb, s-addope.adb, s-except.adb,
s-os_lib.adb, s-string.adb, s-utf_32.adb, a-elchha.adb,
- a-chlat1.ads, a-elchha.ads, a-except.ads, g-hesora.ads, g-htable.ads,
- g-speche.ads, par-prag.adb, restrict.adb, restrict.ads, s-assert.ads,
- s-carun8.ads, s-casuti.ads, s-crc32.ads, sem_ch11.adb, sem_prag.adb,
- s-exctab.ads, s-htable.ads, s-imgenu.ads, s-mastop.ads, snames.adb,
- snames.ads, snames.h, s-purexc.ads, s-secsta.ads, s-soflin.ads,
- s-sopco3.ads, s-sopco4.ads, s-sopco5.ads, s-stache.ads, s-stalib.ads,
- s-stoele.ads, s-strcom.ads, s-strops.ads, s-traceb.ads, s-traent.ads,
- s-unstyp.ads, s-wchcnv.ads, s-wchcon.ads, s-wchjis.ads, s-addope.ads,
+ a-chlat1.ads, a-elchha.ads, a-except.ads, g-hesora.ads, g-htable.ads,
+ g-speche.ads, par-prag.adb, restrict.adb, restrict.ads, s-assert.ads,
+ s-carun8.ads, s-casuti.ads, s-crc32.ads, sem_ch11.adb, sem_prag.adb,
+ s-exctab.ads, s-htable.ads, s-imgenu.ads, s-mastop.ads, snames.adb,
+ snames.ads, snames.h, s-purexc.ads, s-secsta.ads, s-soflin.ads,
+ s-sopco3.ads, s-sopco4.ads, s-sopco5.ads, s-stache.ads, s-stalib.ads,
+ s-stoele.ads, s-strcom.ads, s-strops.ads, s-traceb.ads, s-traent.ads,
+ s-unstyp.ads, s-wchcnv.ads, s-wchcon.ads, s-wchjis.ads, s-addope.ads,
s-except.ads, s-os_lib.ads, s-string.ads, s-utf_32.ads: Implement
pragma Compiler_Unit and adds it to relevant library units.
@@ -9743,7 +9749,7 @@ PR ada/10768
2007-09-12 Thomas Quinot <quinot@adacore.com>
- * g-soccon-solaris-64.ads, g-soccon-hpux-ia64.ads:
+ * g-soccon-solaris-64.ads, g-soccon-hpux-ia64.ads:
Add new constant Thread_Blocking_IO, always True by default, set False
on a per-runtime basis.
(Need_Netdb_Buffer): New constant.
@@ -9994,7 +10000,7 @@ PR ada/10768
2007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
* raise-gcc.c (get_region_description_for, get_call_site_action_for,
- get_action_description_for): Replace _Unwind_Word with _uleb128_t
+ get_action_description_for): Replace _Unwind_Word with _uleb128_t
and _Unwind_SWord with _sleb128_t.
2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
@@ -10021,7 +10027,7 @@ PR ada/10768
PR ada/4720
- * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
+ * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
(Check_Version_And_Help): New procedure in package Switch to process
switches --version and --help.
@@ -10104,7 +10110,7 @@ PR ada/10768
2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
- * restrict.adb, namet.adb, par-util.adb: Remove redundant type
+ * restrict.adb, namet.adb, par-util.adb: Remove redundant type
conversion.
* sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
@@ -10423,7 +10429,7 @@ PR ada/10768
2007-08-14 Thomas Quinot <quinot@adacore.com>
- * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
+ * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
s-osinte-interix.ads, system-interix.ads: Removed.
2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
@@ -10446,7 +10452,7 @@ PR ada/10768
2007-08-14 Robert Dewar <dewar@adacore.com>
Ed Schonberg <schonberg@adacore.com>
- * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
+ * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
Suppress unmodified in-out parameter warning in some cases
This patch is a also fairly significant change to the way suppressible
checks are handled.
@@ -10467,7 +10473,7 @@ PR ada/10768
Ed Schonberg <schonberg@adacore.com>
Thomas Quinot <quinot@adacore.com>
- * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
+ * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
a-stwisu.adb, a-strsup.adb: Fix warnings for range
tests optimized out.
@@ -10542,7 +10548,7 @@ PR ada/10768
* comperr.adb: Fix problem with suppressing warning messages from gigi
- * erroutc.ads, erroutc.adb, errout.ads,
+ * erroutc.ads, erroutc.adb, errout.ads,
errout.adb (Write_Eol): Remove trailing spaces before writing the line
(Write_Eol_Keep_Blanks): New procedure to write a line, including
possible trailing spaces.
@@ -10550,11 +10556,11 @@ PR ada/10768
Fix problem with suppressing warning messages from back end
Improve handling of deleted warnings
- * gnat1drv.adb:
+ * gnat1drv.adb:
Fix problem with suppressing warning messages from back end
Handle setting of Static_Dispatch_Tables flag.
- * prepcomp.adb:
+ * prepcomp.adb:
Fix problem with suppressing warning messages from back end
* exp_intr.adb: Improve handling of deleted warnings
@@ -10754,7 +10760,7 @@ PR ada/10768
Ed Schonberg <schonberg@adacore.com>
Javier Miranda <miranda@adacore.com>
- * exp_util.ads, exp_util.adb:
+ * exp_util.ads, exp_util.adb:
This patch replaces a number of occurrences of explicit tests for N_Null
with calls to Known_Null. This improves tracking of null values, since
Known_Null also catches null constants, and variables currently known to
@@ -10805,7 +10811,7 @@ PR ada/10768
including gprmake, so that the same sources in the GNAT repository
can be used by gprbuild.
- * prj-com.ads:
+ * prj-com.ads:
Major update of the Project Manager and of the project aware tools,
including gprmake, so that the same sources in the GNAT repository
can be used by gprbuild.
@@ -10820,7 +10826,7 @@ PR ada/10768
including gprmake, so that the same sources in the GNAT repository
can be used by gprbuild.
- * prj-env.ads, prj-env.adb:
+ * prj-env.ads, prj-env.adb:
Major update of the Project Manager and of the project aware tools,
including gprmake, so that the same sources in the GNAT repository
can be used by gprbuild.
@@ -10836,7 +10842,7 @@ PR ada/10768
including gprmake, so that the same sources in the GNAT repository
can be used by gprbuild.
- * prj-nmsc.ads, prj-nmsc.adb:
+ * prj-nmsc.ads, prj-nmsc.adb:
Update Project Manager to new attribute names for ghprbuild
Allow all valid declarations in configuration project files
(Search_Directories): Detect subunits that are specified with an
@@ -10855,7 +10861,7 @@ PR ada/10768
(Locate_Directory): Make sure that on Windows '/' is converted to '\',
otherwise creating missing directories will fail.
- * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
+ * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
prj-part.ads, prj-part.adb:
Major update of the Project Manager and of the project aware tools,
including gprmake, so that the same sources in the GNAT repository
@@ -10873,7 +10879,7 @@ PR ada/10768
defaulted to False. When True, always check against indexes in lower
case.
- * snames.ads, snames.h, snames.adb:
+ * snames.ads, snames.h, snames.adb:
Update Project Manager to new attribute names for gprbuild
Allow all valid declarations in configuration project files
@@ -10885,7 +10891,7 @@ PR ada/10768
New switch -gnatI to disable representation clauses
Implement new pragma Implicit_Packing
- * usage.adb:
+ * usage.adb:
Warning for non-local exception propagation now off by default
Add warning for unchecked conversion of pointers wi different
conventions.
@@ -10902,7 +10908,7 @@ PR ada/10768
Add documentation for new -gnatyS style check
Update documentation about SAL and auto-init on Windows.
- * gnat_rm.texi:
+ * gnat_rm.texi:
Add documentation for pragma Check_Name and 'Enabled attribute
Document that Eliminate on dispatching operation is ignored
Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
@@ -11002,7 +11008,7 @@ PR ada/10768
* misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
of the personality function with SJLJ exceptions.
- * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
+ * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
the name of the personality function with SJLJ exceptions.
2007-08-14 Robert Dewar <dewar@adacore.com>
@@ -11097,7 +11103,7 @@ PR ada/10768
2007-08-14 Ed Schonberg <schonberg@adacore.com>
Gary Dismukes <dismukes@adacore.com>
- * exp_aggr.ads,
+ * exp_aggr.ads,
exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
expanded aggregate code before allocator, and ahead of declaration for
temporary, to prevent access before elaboration when the allocator is
@@ -11124,8 +11130,8 @@ PR ada/10768
2007-08-14 Jerome Guitton <guitton@adacore.com>
- * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
- s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
+ * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
+ s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
New functions; dummy implementations.
@@ -11149,11 +11155,11 @@ PR ada/10768
2007-08-14 Vincent Celier <celier@adacore.com>
- * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
+ * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
- mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
- mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
- mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
+ mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
+ mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
+ mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
procedure.
@@ -11175,18 +11181,18 @@ PR ada/10768
* system-solaris-x86.ads (ZCX_By_Default): Switch to True.
(GCC_ZCX_Support): Switch to True.
-
+
* s-intman-solaris.adb (Notify_Exception): Call
Adjust_Context_For_Raise before raising, as expected for signal
handlers in general.
-
+
* s-intman-posix.adb (Notify_Exception): Remove declaration of
Adjust_Context_For_Raise, moved to the spec of this unit to be visible
to other implementation bodies.
-
+
* s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
be visible by multiple implementation bodies.
-
+
* init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
only for conditions coming from hardware.
[alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
@@ -11266,7 +11272,7 @@ PR ada/10768
2007-08-14 Javier Miranda <miranda@adacore.com>
- * a-tags.ads,
+ * a-tags.ads,
a-tags.adb (Displace): Associate a message with the raised CE
exception.
(To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
@@ -11303,7 +11309,7 @@ PR ada/10768
won't be an associated Afile).
(Elab_All_Links): Fail if a referenced unit cannot be found
- * bindgen.adb:
+ * bindgen.adb:
Fix comments in bindgen regarding consistency checks done in Bcheck:
the checks are made across units within a partition, not across several
partitions.
@@ -11397,9 +11403,9 @@ PR ada/10768
2007-08-14 Bob Duff <duff@adacore.com>
- * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
- a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
- a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
+ * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
+ a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
+ a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
a-coorse.ads (Next): Applied pragma Inline.
Make all Containers packages Remote_Types (unless they are already
@@ -11844,14 +11850,14 @@ PR ada/10768
2007-07-27 Aurelien Jarno <aurelien@aurel32.net>
- * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
+ * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
anonymous access type.
(pthread_sigmask): Now take an access sigset_t.
2007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
- * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
-
+ * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
+
2007-06-21 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/25737
@@ -11879,7 +11885,7 @@ PR ada/10768
* misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2007-06-11 Bob Duff <duff@adacore.com>
- Thomas Quinot <quinot@adacore.com>
+ Thomas Quinot <quinot@adacore.com>
* g-stsifd-sockets.adb (Create): Work around strange behavior of
'bind' on windows that causes 'connect' to fail intermittently, by
@@ -11899,8 +11905,8 @@ PR ada/10768
2007-06-06 Thomas Quinot <quinot@adacore.com>
Bob Duff <duff@adacore.com>
- * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
- g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
+ * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
+ g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
constant Thread_Blocking_IO, always True by default, set False
on a per-runtime basis.
@@ -11976,7 +11982,7 @@ PR ada/10768
2007-06-06 Bob Duff <duff@adacore.com>
- * g-expect-vms.adb:
+ * g-expect-vms.adb:
(Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
* g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
(Send_Signal, Close): Raise Invalid_Process if the process id is
@@ -12031,17 +12037,17 @@ PR ada/10768
2007-06-06 Arnaud Charlet <charlet@adacore.com>
- * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
- s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
- s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
- s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
- s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
- s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
- s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
- s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
- s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
+ * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
+ s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
+ s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
+ s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
+ s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
+ s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
+ s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
+ s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
+ s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
- s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
+ s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
time when entering this routine to detect a backward clock setting
(manual setting or DST adjustment), to avoid waiting for a longer delay
than needed.
@@ -12087,14 +12093,14 @@ PR ada/10768
2007-06-06 Arnaud Charlet <charlet@adacore.com>
- * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
- system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
- system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
- system-vxworks-mips.ads, system-vxworks-alpha.ads,
- system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
- system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
- system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
- system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
+ * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
+ system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
+ system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
+ system-vxworks-mips.ads, system-vxworks-alpha.ads,
+ system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
+ system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
+ system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
+ system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
system-solaris-sparcv9.ads, system-vms.ads, system.ads,
system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
system-linux-ia64.ads: Document mapping between Ada and OS priorities.
@@ -12117,10 +12123,10 @@ PR ada/10768
* mlib-tgt-specific.adb, mlib-tgt-specific.ads,
mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
- * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
- mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
- mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
- mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
+ * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
+ mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
+ mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
+ mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
MLib.Tgt, containing the default versions of the exported subprograms.
For each platform, create a specific version of the body of new child
@@ -12138,7 +12144,7 @@ PR ada/10768
* s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
its C counterpart.
Remove references to Unchecked_Conversion, and use Ada.xxx instead.
- Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
+ Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
2007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
@@ -12305,23 +12311,23 @@ PR ada/10768
(build_unc_object_type): Likewise.
(declare_debug_type): New function.
- * ada-tree.def: USE_STMT: removed (not emitted anymore).
+ * ada-tree.def: USE_STMT: removed (not emitted anymore).
- * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
- no statement is expandable anymore.
- (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
- (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
- when the user requested it explicitely.
- (gnat_post_options): By default, set flag_eliminate_unused_debug_types
- to 0 for Ada.
- (get_alias_set): Return alias set 0 for a type if
- TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
+ * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
+ no statement is expandable anymore.
+ (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
+ (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
+ when the user requested it explicitely.
+ (gnat_post_options): By default, set flag_eliminate_unused_debug_types
+ to 0 for Ada.
+ (get_alias_set): Return alias set 0 for a type if
+ TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
- * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
- (DECL_FUNCTION_STUB): New accessor macro.
- (SET_DECL_FUNCTION_STUB): New setter macro.
+ * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
+ (DECL_FUNCTION_STUB): New accessor macro.
+ (SET_DECL_FUNCTION_STUB): New setter macro.
- * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
+ * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
* fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
declarations.
@@ -12413,18 +12419,18 @@ PR ada/10768
2007-06-06 Vincent Celier <celier@adacore.com>
Robert Dewar <dewar@adacore.com>
- * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
- butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
- err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
- fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
- lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
- makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
- par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
- prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
- prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
- sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
+ * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
+ butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
+ err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
+ fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
+ lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
+ makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
+ par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
+ prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
+ prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
+ sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb,
- ali.ads, ali.adb:
+ ali.ads, ali.adb:
Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to
package Namet. Make File_Name_Type and Unit_Name_Type types derived from
Mame_Id. Add new type Path_Name_Type, also derived from Name_Id.
@@ -12647,7 +12653,7 @@ PR ada/10768
some use of System.Restrictions in the partition.
(Check_System_Restrictions_Used): New procedure
- * s-stalib.adb: Remove with of System.Restrictions. No longer needed
+ * s-stalib.adb: Remove with of System.Restrictions. No longer needed
since we only with this unit in the binder file if it is used elsewhere
in the partition.
@@ -12838,7 +12844,7 @@ PR ada/10768
Bob Duff <duff@adacore.com>
Hristian Kirtchev <kirtchev@adacore.com>
- * exp_aggr.ads, exp_aggr.adb:
+ * exp_aggr.ads, exp_aggr.adb:
(Build_Record_Aggr_Code): Add missing initialization of secondary tags
in extension aggregates.
(Flatten): Other conditions being met, an aggregate is static if the
@@ -13377,7 +13383,7 @@ PR ada/10768
objects.
Remove all handling of with_type clauses.
- * par-ch10.adb: Remove all handling of with_type clauses.
+ * par-ch10.adb: Remove all handling of with_type clauses.
* lib-load.ads, lib-load.adb (Load_Main_Source): Do not get the
checksum if the main source could not be parsed.
@@ -13420,7 +13426,7 @@ PR ada/10768
2007-06-06 Robert Dewar <dewar@adacore.com>
Ed Schonberg <schonberg@adacore.com>
- * g-comlin.ads, g-comlin.adb:
+ * g-comlin.ads, g-comlin.adb:
Add new warning for renaming of function return objects
* opt.adb (Tree_Write, Tree_Read): Use proper expressions for size
@@ -13513,7 +13519,7 @@ PR ada/10768
2007-06-06 Vincent Celier <celier@adacore.com>
- * gnatls.adb:
+ * gnatls.adb:
Add 3 spaces before the default project directory when displaying
the project search path.
Add new command line switch '-l' to display license information.
@@ -13793,7 +13799,7 @@ PR ada/10768
(Copy_ALI_Files): Make sure that an already existing ALI file in the
ALI copy dir is writable, before doing the copy.
- * mlib-utl.ads, mlib-utl.adb:
+ * mlib-utl.ads, mlib-utl.adb:
(Gcc): If length of command line is too long, put the list of object
files in a response file, if this is supported by the platform.
(Ar): If invocation of the archive builder is allowed to be done in
@@ -14494,7 +14500,7 @@ PR ada/10768
2007-06-06 Javier Miranda <miranda@adacore.com>
- * a-cidlli.ads, a-cdlili.ads, a-cohama.ads, a-coinve.ads,
+ * a-cidlli.ads, a-cdlili.ads, a-cohama.ads, a-coinve.ads,
a-convec.ads (Empty_Vector, Empty_Map, Empty_List): Move this object
declaration after freezing point of all its associated tagged types;
otherwise such types are frozen too early.
@@ -14612,22 +14618,22 @@ PR ada/10768
s-taprop-hpux-dce.adb, s-traceb-hpux.adb,
s-taprop-linux.adb, s-taprop-dummy.adb, s-osprim-unix.adb,
s-osprim-solaris.adb, s-taprop-solaris.adb, s-taprop-vms.adb,
- s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb,
- s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads,
- a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb,
- a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads,
- g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads,
- s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb,
- s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads,
- s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb,
- s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads,
- s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb,
- s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb,
- a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads,
- a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads,
- a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb,
+ s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb,
+ s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads,
+ a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb,
+ a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads,
+ g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads,
+ s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb,
+ s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads,
+ s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb,
+ s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads,
+ s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb,
+ s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb,
+ a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads,
+ a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads,
+ a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb,
a-cohase.ads, a-swuwha.ads, a-ciormu.ads, a-coormu.ads, a-rbtgso.ads,
- a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads,
+ a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads,
a-ztexio.adb, a-ztexio.ads: Addition of null-exclusion to anonymous
access types.
Update documentation.
@@ -14644,7 +14650,7 @@ PR ada/10768
system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
system-vxworks-alpha.ads, system-vms_64.ads, system-darwin-ppc.ads,
system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
- system-hpux-ia64.ads, targparm.adb,
+ system-hpux-ia64.ads, targparm.adb,
targparm.ads (Functions_Return_By_DSP_On_Target): Removed
* system.ads: Move Functions_Return_By_DSP to obsolete section,
@@ -14801,7 +14807,7 @@ PR ada/10768
* a-calari.ads, a-calari.adb ("+", "-", Difference): Add calls to
target independent routines in Ada.Calendar.
- * a-calfor.ads, a-calfor.adb:
+ * a-calfor.ads, a-calfor.adb:
Code cleanup and addition of validity checks in various routines.
(Day_Of_Week, Split, Time_Of): Add call to target independent routine in
Ada.Calendar.
@@ -14811,7 +14817,7 @@ PR ada/10768
2007-04-06 Olivier Hainque <hainque@adacore.com>
- * adaint.c:
+ * adaint.c:
(convert_addresses): Adjust prototype and dummy definition to expect an
extra file_name argument.
@@ -15830,7 +15836,7 @@ PR ada/10768
2007-04-06 Ed Schonberg <schonberg@adacore.com>
Javier Miranda <miranda@adacore.com>
- * lib-xref.ads, lib-xref.adb:
+ * lib-xref.ads, lib-xref.adb:
Modify the loop that collects type references, to include interface
types that the type implements. List each of these interfaces when
building the entry for the type.
@@ -16156,15 +16162,15 @@ PR ada/10768
(Preserve_Full_Attributes): The full entity list is not an attribute
that must be preserved from full to partial view.
- * sem_dist.adb (Add_RAS_Dereference_TSS):
- Change primitive name to _Call so it cannot clash with any legal
- identifier, and be special-cased in Check_Completion.
- Mark the full view of the designated type for the RACW associated with
- a RAS as Comes_From_Source to get proper view switching when installing
- private declarations.
- Provite a placeholder nested package body along with the nested spec
- to have a place for Append_RACW_Bodies to generate the calling stubs
- and stream attributes.
+ * sem_dist.adb (Add_RAS_Dereference_TSS):
+ Change primitive name to _Call so it cannot clash with any legal
+ identifier, and be special-cased in Check_Completion.
+ Mark the full view of the designated type for the RACW associated with
+ a RAS as Comes_From_Source to get proper view switching when installing
+ private declarations.
+ Provite a placeholder nested package body along with the nested spec
+ to have a place for Append_RACW_Bodies to generate the calling stubs
+ and stream attributes.
2007-04-06 Ed Schonberg <schonberg@adacore.com>
Robert Dewar <dewar@adacore.com>
@@ -16321,7 +16327,7 @@ PR ada/10768
2007-04-06 Eric Botcazou <botcazou@adacore.com>
- * s-stchop-vxworks.adb:
+ * s-stchop-vxworks.adb:
(Stack_Check): Raise Storage_Error if the argument has wrapped around.
2007-04-06 Robert Dewar <dewar@adacore.com>
@@ -16435,7 +16441,7 @@ PR ada/10768
2007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
* raise-gcc.c (get_region_description_for, get_call_site_action_for,
- get_action_description_for): Replace _Unwind_Word with _uleb128_t
+ get_action_description_for): Replace _Unwind_Word with _uleb128_t
and _Unwind_SWord with _sleb128_t.
2007-02-06 Paolo Bonzini <bonzini@gnu.org>
@@ -16589,7 +16595,7 @@ PR ada/10768
part of Ada.Calendar: all subprogram raise Unimplemented.
(Split_W_Offset): Temp function body, raising Unimplemented
- * a-calend.ads, a-calend-vms.ads:
+ * a-calend.ads, a-calend-vms.ads:
Add imported variable Invalid_TZ_Offset used to designate targets unable
to support time zones.
(Unimplemented): Temporary function raised by the body of new
@@ -16627,13 +16633,13 @@ PR ada/10768
2006-10-31 Arnaud Charlet <charlet@adacore.com>
Jose Ruiz <ruiz@adacore.com>
- * s-osinte-posix.adb, s-osinte-linux.ads, s-osinte-freebsd.adb,
- s-osinte-freebsd.ads, s-osinte-solaris-posix.ads, s-osinte-hpux.ads,
+ * s-osinte-posix.adb, s-osinte-linux.ads, s-osinte-freebsd.adb,
+ s-osinte-freebsd.ads, s-osinte-solaris-posix.ads, s-osinte-hpux.ads,
s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-lynxos-3.ads,
s-osinte-lynxos-3.adb (To_Target_Priority): New function maps from
System.Any_Priority to a POSIX priority on the target.
- * system-linux-ia64.ads:
+ * system-linux-ia64.ads:
Extend range of Priority types on Linux to use the whole range made
available by the system.
@@ -16654,12 +16660,12 @@ PR ada/10768
Priority_Specific_Dispatching pragmas when determining if Round Robin
must be used for scheduling the task.
- * system-linux-x86_64.ads, system-linux-x86.ads,
+ * system-linux-x86_64.ads, system-linux-x86.ads,
system-linux-ppc.ads: Extend range of Priority types on Linux to use
the whole range made available by the system.
- * s-taprop-vms.adb, s-taprop-mingw.adb, s-taprop-irix.adb,
- s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-hpux-dce.adb,
+ * s-taprop-vms.adb, s-taprop-mingw.adb, s-taprop-irix.adb,
+ s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-hpux-dce.adb,
s-taprop-lynxos.adb (Finalize_TCB): invalidate the stack-check cache
when deallocating the TCB in order to avoid potential references to
deallocated data.
@@ -16678,14 +16684,14 @@ PR ada/10768
2006-10-31 Robert Dewar <dewar@adacore.com>
- * system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
- system-linux-hppa.ads, system-hpux-ia64.ads,
- system-lynxos-ppc.ads, system-lynxos-x86.ads, system-tru64.ads,
- system-vxworks-sparcv9.ads, system-solaris-x86.ads,
- system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
- system-vxworks-m68k.ads, system-vxworks-mips.ads, system-interix.ads,
- system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
- system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
+ * system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
+ system-linux-hppa.ads, system-hpux-ia64.ads,
+ system-lynxos-ppc.ads, system-lynxos-x86.ads, system-tru64.ads,
+ system-vxworks-sparcv9.ads, system-solaris-x86.ads,
+ system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
+ system-vxworks-m68k.ads, system-vxworks-mips.ads, system-interix.ads,
+ system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
+ system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
system-vxworks-alpha.ads, system.ads: Add pragma Warnings(Off,
Default_Bit_Order) to kill constant condition warnings for references
to this switch.
@@ -16703,7 +16709,7 @@ PR ada/10768
* mlib-fil.ads, mlib-fil.adb: (Append_To): New function
- * mlib-tgt-darwin.adb:
+ * mlib-tgt-darwin.adb:
Use Append_To, instead of Ext_To, when building the library file name
(Flat_Namespace): New global variable.
(No_Shared_Libgcc_Switch): Rename to No_Shared_Libgcc_Options.
@@ -16720,7 +16726,7 @@ PR ada/10768
2006-10-31 Jose Ruiz <ruiz@adacore.com>
- * s-osinte-vxworks.ads, s-osinte-vxworks.adb:
+ * s-osinte-vxworks.ads, s-osinte-vxworks.adb:
(getpid): New body for this function that uses the underlying taskIdSelf
function for VxWorks 5 and VxWorks 6 in kernel mode.
(unsigned_int): New type, modular to allow logical bit operations.
@@ -16953,11 +16959,11 @@ PR ada/10768
* lib.adb, lib.ads: (In_Predefined_Unit): New functions
- * a-finali.ads, a-ngcoty.ads, a-strbou.ads, a-stream.ads, a-strmap.ads,
- a-strunb.ads, a-stwibo.ads, a-stwima.ads, a-stwiun.ads, a-taside.ads,
- a-coorse.ads, a-convec.ads, a-coinve.ads, a-cohama.ads, a-ciorse.ads,
- a-cihama.ads, a-cihase.ads, a-cohase.ads, a-ciorma.ads, a-coorma.ads,
- a-ciormu.ads, a-coormu.ads, a-stzbou.ads, a-stzmap.ads, a-stzunb.ads,
+ * a-finali.ads, a-ngcoty.ads, a-strbou.ads, a-stream.ads, a-strmap.ads,
+ a-strunb.ads, a-stwibo.ads, a-stwima.ads, a-stwiun.ads, a-taside.ads,
+ a-coorse.ads, a-convec.ads, a-coinve.ads, a-cohama.ads, a-ciorse.ads,
+ a-cihama.ads, a-cihase.ads, a-cohase.ads, a-ciorma.ads, a-coorma.ads,
+ a-ciormu.ads, a-coormu.ads, a-stzbou.ads, a-stzmap.ads, a-stzunb.ads,
a-except-2005.ads: Add pragma Preelaborable_Warning
2006-10-31 Robert Dewar <dewar@adacore.com>
@@ -17057,7 +17063,7 @@ PR ada/10768
2006-10-31 Javier Miranda <miranda@adacore.com>
- * a-tags.ads, a-tags.adb:
+ * a-tags.ads, a-tags.adb:
(Predefined_DT): New function that improves readability of the code.
(Get_Predefined_Prim_Op_Address, Set_Predefined_Prim_Op_Address,
Inherit_DT): Use the new function Predefined_DT to improve code
@@ -17215,10 +17221,10 @@ PR ada/10768
Implement insertion character ~ (insert string)
(First_Node): Minor adjustments to get better placement.
- * frontend.adb:
+ * frontend.adb:
Implement new -gnatl=xxx switch to output listing to file
- * gnat1drv.adb:
+ * gnat1drv.adb:
Implement new -gnatl=xxx switch to output listing to file
* opt.ads: (Warn_On_Questionable_Missing_Paren): New switch
@@ -17239,12 +17245,12 @@ PR ada/10768
invoked with a relative path.
(Executable_Name): New function taking string parameters.
- * osint-c.ads, osint-c.adb:
+ * osint-c.ads, osint-c.adb:
Implement new -gnatl=xxx switch to output listing to file
* sinput-d.adb: Change name Creat_Debug_File to Create_Debug_File
- * switch-c.adb:
+ * switch-c.adb:
Implement new -gnatl=xxx switch to output listing to file
Recognize new -gnatL switch
(no longer keep in old warning about old style usage)
@@ -17295,7 +17301,7 @@ PR ada/10768
Javier Miranda <miranda@adacore.com>
Robert Dewar <dewar@adacore.com>
- * exp_attr.adb:
+ * exp_attr.adb:
(Expand_Access_To_Protected_Op): If the context indicates that an access
to a local operation may be transfered outside of the object, create an
access to the wrapper operation that must be used in an external call.
@@ -18141,7 +18147,7 @@ PR ada/10768
* rtsfind.adb: Remove s-polint from comment as it exists no more.
- * rtsfind.ads:
+ * rtsfind.ads:
Move entity RE_Get_Active_Partition_Id to package System.DSA_Services.
Move all the entities in obsolete package System.PolyORB_Interface to
System.Partition_Interface.
@@ -18593,7 +18599,7 @@ PR ada/10768
2006-10-31 Robert Dewar <dewar@adacore.com>
- * s-osinte-tru64.adb:
+ * s-osinte-tru64.adb:
Mark Asm statements Volatile to prevent warnings (seems a
reasonable change anyway)
Fixes new warnings
@@ -18681,7 +18687,7 @@ PR ada/10768
(No_Restrictions): New constant used to clean up code and follow
preelaborate constraints.
- * s-stalib.adb:
+ * s-stalib.adb:
Add System.Restrictions dependence, referenced directly from the
binder generated file.
@@ -18812,7 +18818,7 @@ PR ada/10768
2006-10-31 Pat Rogers <rogers@adacore.com>
- * a-rttiev.ads, a-rttiev.adb:
+ * a-rttiev.ads, a-rttiev.adb:
This is a significant redesign primarily for the sake of automatic
timer task termination but also to fix a design flaw.
Therefore we are now using an RTS lock, instead of a protected
@@ -18845,7 +18851,7 @@ PR ada/10768
Clarify that inlining is not always possible
Update documentation on pragma Unchecked_Union.
- * gnat_rm.texi:
+ * gnat_rm.texi:
Add documentation for new extended version of pragma Obsolescent
Add documentation for implementation defined attribute 'Stub_Type.
Add note on use of Volatile in asm statements
@@ -18859,7 +18865,7 @@ PR ada/10768
Clarify difference between No_Dispatching_Calls & No_Dispatch.
Add documentation for pragma Restrictions (No_Elaboration_Code)
- * gnat-style.texi:
+ * gnat-style.texi:
Add comments on layout of subprogram local variables in the
presence of nested subprograms.
@@ -18876,7 +18882,7 @@ PR ada/10768
* usage.adb: Update documentation.
- * validsw.ads, validsw.adb:
+ * validsw.ads, validsw.adb:
Add definition of Validity_Check_Components and implement -gnatVe/E
* vms_data.ads: Add missing VMS qualifiers.
@@ -18917,10 +18923,10 @@ PR ada/10768
* s-soflin.adb: Minor reformatting
- * s-stoele.ads:
+ * s-stoele.ads:
Add comment about odd qualification in Storage_Offset declaration
- * s-strxdr.adb:
+ * s-strxdr.adb:
Remove unnecessary 'in' keywords for formal parameters.
* treeprs.adt: Minor reformatting
@@ -18948,7 +18954,7 @@ PR ada/10768
* lang.opt: Woverlength-strings: New option.
- * nmake.adt:
+ * nmake.adt:
Update copyright, since nmake.ads and nmake.adb have changed.
* osint-b.ads, osint-b.adb (Time_From_Last_Bind): removed function .
@@ -19232,9 +19238,9 @@ PR ada/10768
2006-02-17 Jose Ruiz <ruiz@adacore.com>
- * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-linux.adb,
- s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
- s-taprop-posix.adb, s-taprop-vxworks.adb, s-taprop-lynxos.adb,
+ * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-linux.adb,
+ s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
+ s-taprop-posix.adb, s-taprop-vxworks.adb, s-taprop-lynxos.adb,
s-taprop-tru64.adb (Set_False, Set_True, Suspend_Until_True): Add
Abort_Defer/Undefer pairs to avoid the possibility of a task being
aborted while owning a lock.
@@ -19344,7 +19350,7 @@ PR ada/10768
2006-02-17 Matthew Heaney <heaney@adacore.com>
- * a-convec.ads, a-convec.adb:
+ * a-convec.ads, a-convec.adb:
(operator "&"): handle potential overflow for large index types
(Insert): removed Contraint_Error when using large index types
(Insert_Space): removed Constraint_Error for large index types
@@ -19363,7 +19369,7 @@ PR ada/10768
* s-wchcnv.adb: Document handling of [ on output (we do not change
this to ["5B"] and the new comments say why not.
- * gnat_ugn.texi:
+ * gnat_ugn.texi:
Add note for -gnatVo that this now includes the cases of type
conversions and qualified expressions.
Add comments on handling of brackets encoding for Text_IO
@@ -19483,11 +19489,11 @@ PR ada/10768
2006-02-13 Arnaud Charlet <charlet@adacore.com>
- * s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-vxworks.ads,
- s-osinte-solaris.ads, s-osinte-linux.ads, s-osinte-freebsd.ads,
- s-osinte-solaris-posix.ads, s-osinte-lynxos-3.ads, s-osinte-lynxos.ads,
- s-osinte-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads,
- s-osinte-hpux-dce.ads, s-osinte-linux-hppa.ads,
+ * s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-vxworks.ads,
+ s-osinte-solaris.ads, s-osinte-linux.ads, s-osinte-freebsd.ads,
+ s-osinte-solaris-posix.ads, s-osinte-lynxos-3.ads, s-osinte-lynxos.ads,
+ s-osinte-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads,
+ s-osinte-hpux-dce.ads, s-osinte-linux-hppa.ads,
s-osinte-linux-alpha.ads, s-inmaop-posix.adb (sigset_t_ptr): Removed,
replaced by anonymous access type.
(pthread_sigmask): Now take an access sigset_t
@@ -19498,8 +19504,8 @@ PR ada/10768
2006-02-13 Pascal Obry <obry@adacore.com>
- * s-taprop-posix.adb, s-taprop-vxworks.adb, s-taprop-tru64.adb,
- s-taprop-lynxos.adb, s-taprop-irix.adb, s-taprop-hpux-dce.adb,
+ * s-taprop-posix.adb, s-taprop-vxworks.adb, s-taprop-tru64.adb,
+ s-taprop-lynxos.adb, s-taprop-irix.adb, s-taprop-hpux-dce.adb,
s-taprop-linux.adb, s-taprop-solaris.adb,
s-taprop-vms.adb (Create_Task): Remove task adjustment code. This
adjustement is already done when calling this routine.
@@ -19588,7 +19594,7 @@ PR ada/10768
Eric Botcazou <ebotcazou@adacore.com>
* ada-tree.h: (TYPE_UNCHECKED_UNION_P): Deleted.
-
+
* gigi.h (value_factor_p): Add prototype and description, now public.
* decl.c (gnat_to_gnu_field): Don't attempt BLKmode to integral type
@@ -19814,8 +19820,8 @@ PR ada/10768
2006-02-13 Matthew Heaney <heaney@adacore.com>
- * a-rbtgso.adb, a-crbtgo.adb, a-crbtgk.adb, a-coorse.adb,
- a-cohama.adb, a-ciorse.adb, a-cihama.adb, a-cihase.adb,
+ * a-rbtgso.adb, a-crbtgo.adb, a-crbtgk.adb, a-coorse.adb,
+ a-cohama.adb, a-ciorse.adb, a-cihama.adb, a-cihase.adb,
a-cohase.adb: All explicit raise statements now include an exception
message.
@@ -19872,7 +19878,7 @@ PR ada/10768
2006-02-13 Robert Dewar <dewar@adacore.com>
- * rtsfind.adb, exp_prag.adb, lib-writ.adb, par-labl.adb,
+ * rtsfind.adb, exp_prag.adb, lib-writ.adb, par-labl.adb,
sem_case.adb: Minor code reorganization (not Present should be No)
2006-02-13 Geert Bosch <bosch@adacore.com>
@@ -20011,7 +20017,7 @@ PR ada/10768
Define Tree_Version_String as a dynamic string.
(Default_Stack_Size): new variable, used to handle switch -d.
- * par-prag.adb:
+ * par-prag.adb:
For pragma Ada_2005, remove stuff about setting Ada_Version_Explicit
only for main unit.
Add pragma Ada_2005 (synonym for Ada_05)
@@ -21023,7 +21029,7 @@ PR ada/10768
Multi_Unit_Index_Character after OpenVMS_On_Target gets its definitive
value.
(Get_Target_Parameters): Set OpenVMS_On_Target if openvms.
-
+
* targparm.ads: Add special exception to license.
* g-os_lib.ads, g-os_lib.adb (Get_Target_Debuggable_Suffix): New
@@ -21144,11 +21150,11 @@ PR ada/10768
(Set_Output): new subprogram
(Put): now uses the value of Current_Out to know if the output has to be
send to stderr or stdout.
-
+
* s-stausa.ads: Complete implementation.
* switch-b.adb: Added handling of -u switch for dynamic stack analysis.
-
+
* impunit.adb (Non_Imp_File_Names_05): Add Ada.Task_Termination to the
list of Ada 05 files.
(GNAT Library Units): Add AltiVec files.
@@ -21320,7 +21326,7 @@ PR ada/10768
* namet.ads (Name_Buffer): Adjust size to reflect increase on max line
length.
- * scn.adb, scng.adb:
+ * scn.adb, scng.adb:
Always check line length against the absolute supported maximum,
Hostparm.Max_Line_Length.
@@ -21432,7 +21438,7 @@ PR ada/10768
* par-ch12.adb (P_Formal_Derived_Type_Definition): In Ada 2005, handle
use of "limited" in declaration.
- * sinfo.ads, sinfo.adb:
+ * sinfo.ads, sinfo.adb:
Formal derived types can carry an explicit "limited" indication.
* sem_ch3.adb: Add with and use of Targparm.
@@ -21657,7 +21663,7 @@ PR ada/10768
2005-12-09 Robert Dewar <dewar@adacore.com>
- * g-soccon.ads:
+ * g-soccon.ads:
Further comment fixes to make the status of the default file clear
* s-bitops.adb: Clarify comment for Bits_Array
@@ -21732,7 +21738,7 @@ PR ada/10768
PR ada/24855
* raise-gcc.c: Add missing stdarg.h include.
-
+
2005-11-16 Richard Guenther <rguenther@suse.de>
* Make-lang.in (ada/decl.o): Add $(EXPR_H) dependency.
@@ -21760,7 +21766,7 @@ PR ada/10768
g-soccon-solaris-64.ads, g-soccon-linux-64.ads,
g-soccon-linux-x86.ads: New files.
- * g-socthi-mingw.adb:
+ * g-socthi-mingw.adb:
(Socket_Error_Message): Remove redundant use of GNAT.Sockets.Constants
* g-socthi-vxworks.ads, g-socthi-vms.ads, g-socthi-mingw.ads
@@ -21849,10 +21855,10 @@ PR ada/10768
* s-mastop-tru64.adb (Pop_Frame): Remove redundant parentheses in if
statement.
- * s-taprop-solaris.adb:
+ * s-taprop-solaris.adb:
Change some <= to =, to avoid new warning
- * a-exexda.adb, prj-proc.adb:
+ * a-exexda.adb, prj-proc.adb:
Fix obvious typo (Num_Tracebacks compared <= 0 instead of < 0)
Fix obvious typo (Total_Errors_Detected <= 0 should be = 0)
@@ -21866,7 +21872,7 @@ PR ada/10768
2005-11-14 Matthew Gingell <gingell@adacore.com>
- * system-lynxos-ppc.ads, system-lynxos-x86.ads:
+ * system-lynxos-ppc.ads, system-lynxos-x86.ads:
Increase default priority on Lynx from 15 to 17, and meet the Ada
requirement that Default_Priority be ((Priority'First +
Priority'Last) / 2) by increasing the range of Interrupt_Priority.
@@ -22075,12 +22081,12 @@ PR ada/10768
2005-11-14 Matthew Heaney <heaney@adacore.com>
- * a-crbtgo.ads, a-crbtgo.adb, a-coorse.ads, a-coorse.adb, a-convec.ads,
- a-convec.adb, a-coinve.ads, a-coinve.adb, a-cohama.ads, a-cohama.adb,
- a-ciorse.ads, a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-cidlli.ads,
- a-cidlli.adb, a-cdlili.ads, a-cdlili.adb, a-coormu.adb, a-ciormu.adb,
- a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
- a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorma.adb, a-coorma.adb:
+ * a-crbtgo.ads, a-crbtgo.adb, a-coorse.ads, a-coorse.adb, a-convec.ads,
+ a-convec.adb, a-coinve.ads, a-coinve.adb, a-cohama.ads, a-cohama.adb,
+ a-ciorse.ads, a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-cidlli.ads,
+ a-cidlli.adb, a-cdlili.ads, a-cdlili.adb, a-coormu.adb, a-ciormu.adb,
+ a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
+ a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorma.adb, a-coorma.adb:
Compiles against the spec for ordered maps described in sections
A.18.6 of the most recent (August 2005) AI-302 draft.
@@ -22186,7 +22192,7 @@ PR ada/10768
* binde.adb: Implement new AD/ED for Elaborate_All/Elaborate desirable
(Elab_Error_Msg): Use -da to include internal unit links, not -de.
- * lib-writ.ads, lib-writ.adb:
+ * lib-writ.ads, lib-writ.adb:
Implement new AD/ED for Elaborate_All/Elaborate desirable
Use new Elaborate_All_Desirable flag in N_With_Clause node
@@ -22264,7 +22270,7 @@ PR ada/10768
* Makefile.rtl: Add new instantiations of system.fat_gen
- * s-fatflt.ads, s-fatlfl.ads, s-fatllf.ads, s-fatsfl.ads:
+ * s-fatflt.ads, s-fatlfl.ads, s-fatllf.ads, s-fatsfl.ads:
Change name of instantiated package for better consistency
with newly added system.fat_gen instantiations.
@@ -22855,7 +22861,7 @@ PR ada/10768
Jose Ruiz <ruiz@adacore.com>
Pascal Obry <obry@adacore.com>
- * gnat_ugn.texi:
+ * gnat_ugn.texi:
Document that -fstack-check is needed for strict compliance with the
Ada 95 Reference Manual.
Correct reference to VAX systems to meet HP guidelines
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index dc43f48a133..f0211dc8f2e 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -1457,7 +1457,7 @@ ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
endif
ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
- LIBGNAT_TARGET_PAIRS = \
+ LIBGNAT_TARGET_PAIRS_COMMON = \
a-intnam.ads<a-intnam-linux.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
@@ -1470,9 +1470,22 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
s-tasinf.adb<s-tasinf-linux.adb \
s-taspri.ads<s-taspri-posix-noaltstack.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
- g-sercom.adb<g-sercom-linux.adb \
+ g-sercom.adb<g-sercom-linux.adb
+
+ LIBGNAT_TARGET_PAIRS_32 = \
system.ads<system-linux-ppc.ads
+ LIBGNAT_TARGET_PAIRS_64 = \
+ system.ads<system-linux-ppc64.ads
+
+ ifeq ($(strip $(MULTISUBDIR)),/64)
+ LIBGNAT_TARGET_PAIRS = \
+ $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
+ else
+ LIBGNAT_TARGET_PAIRS = \
+ $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
+ endif
+
TOOLS_TARGET_PAIRS = \
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
diff --git a/gcc/ada/system-linux-ppc64.ads b/gcc/ada/system-linux-ppc64.ads
new file mode 100644
index 00000000000..5f591bb7dc2
--- /dev/null
+++ b/gcc/ada/system-linux-ppc64.ads
@@ -0,0 +1,155 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (GNU-Linux/PPC64 Version) --
+-- --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 64;
+ Memory_Size : constant := 2 ** 64;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := High_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ -- 0 .. 98 corresponds to the system priority range 1 .. 99.
+ --
+ -- If the scheduling policy is SCHED_FIFO or SCHED_RR the runtime makes use
+ -- of the entire range provided by the system.
+ --
+ -- If the scheduling policy is SCHED_OTHER the only valid system priority
+ -- is 1 and other values are simply ignored.
+
+ Max_Priority : constant Positive := 97;
+ Max_Interrupt_Priority : constant Positive := 98;
+
+ subtype Any_Priority is Integer range 0 .. 98;
+ subtype Priority is Any_Priority range 0 .. 97;
+ subtype Interrupt_Priority is Any_Priority range 98 .. 98;
+
+ Default_Priority : constant Priority := 48;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := False;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_64_Bit_Divides : constant Boolean := True;
+ Support_Aggregates : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := True;
+ GCC_ZCX_Support : constant Boolean := True;
+
+end System;
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 24e2933c3b4..57bd0bb5ca9 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1303,31 +1303,6 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
return false;
}
-/* Print a warning about if (); or if () .. else; constructs
- via the special empty statement node that we create. INNER_THEN
- and INNER_ELSE are the statement lists of the if and the else
- block. */
-
-void
-empty_if_body_warning (tree inner_then, tree inner_else)
-{
- if (TREE_CODE (inner_then) == STATEMENT_LIST
- && STATEMENT_LIST_TAIL (inner_then))
- inner_then = STATEMENT_LIST_TAIL (inner_then)->stmt;
-
- if (inner_else && TREE_CODE (inner_else) == STATEMENT_LIST
- && STATEMENT_LIST_TAIL (inner_else))
- inner_else = STATEMENT_LIST_TAIL (inner_else)->stmt;
-
- if (IS_EMPTY_STMT (inner_then) && !inner_else)
- warning (OPT_Wempty_body, "%Hsuggest braces around empty body "
- "in an %<if%> statement", EXPR_LOCUS (inner_then));
-
- else if (inner_else && IS_EMPTY_STMT (inner_else))
- warning (OPT_Wempty_body, "%Hsuggest braces around empty body "
- "in an %<else%> statement", EXPR_LOCUS (inner_else));
-}
-
/* Warn for unlikely, improbable, or stupid DECL declarations
of `main'. */
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 15ea5731de1..622100a40cf 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -726,7 +726,6 @@ struct varray_head_tag;
extern void constant_expression_warning (tree);
extern void constant_expression_error (tree);
extern bool strict_aliasing_warning (tree, tree, tree);
-extern void empty_if_body_warning (tree, tree);
extern void warnings_for_convert_and_check (tree, tree, tree);
extern tree convert_and_check (tree, tree);
extern void overflow_warning (tree);
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 2b64c86953a..9597660915d 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -3858,8 +3858,12 @@ c_parser_if_body (c_parser *parser, bool *if_p)
*if_p = c_parser_next_token_is_keyword (parser, RID_IF);
if (c_parser_next_token_is (parser, CPP_SEMICOLON))
{
+ location_t loc = c_parser_peek_token (parser)->location;
add_stmt (build_empty_stmt ());
c_parser_consume_token (parser);
+ if (!c_parser_next_token_is_keyword (parser, RID_ELSE))
+ warning_at (loc, OPT_Wempty_body,
+ "suggest braces around empty body in an %<if%> statement");
}
else if (c_parser_next_token_is (parser, CPP_OPEN_BRACE))
add_stmt (c_parser_compound_statement (parser));
@@ -3883,6 +3887,9 @@ c_parser_else_body (c_parser *parser)
c_parser_label (parser);
if (c_parser_next_token_is (parser, CPP_SEMICOLON))
{
+ warning_at (c_parser_peek_token (parser)->location,
+ OPT_Wempty_body,
+ "suggest braces around empty body in an %<else%> statement");
add_stmt (build_empty_stmt ());
c_parser_consume_token (parser);
}
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 14244051f17..c6474ed5da1 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -7440,8 +7440,6 @@ c_finish_if_stmt (location_t if_locus, tree cond, tree then_block,
&if_locus);
}
- empty_if_body_warning (then_block, else_block);
-
stmt = build3 (COND_EXPR, void_type_node, cond, then_block, else_block);
SET_EXPR_LOCATION (stmt, if_locus);
add_stmt (stmt);
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 22bca4d57a1..e3d170aad95 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1791,6 +1791,11 @@ powerpc-*-eabialtivec*)
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
;;
+powerpc-xilinx-eabi*)
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
+ ;;
powerpc-*-eabi*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
extra_options="${extra_options} rs6000/sysv4.opt"
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index f362ddeda26..406727139c8 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -338,3 +338,7 @@ Support AES built-in functions and code generation
mpclmul
Target Report Mask(ISA_PCLMUL) Var(ix86_isa_flags) VarExists Save
Support PCLMUL built-in functions and code generation
+
+msse2avx
+Target Report Var(ix86_sse2avx)
+Encode SSE instructions with VEX prefix
diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
index 78326b05ec0..ca9a136b3e5 100644
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
@@ -102,6 +102,11 @@ along with GCC; see the file COPYING3. If not see
#define LINK_EMULATION "elf_i386"
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#undef ASM_SPEC
+#define ASM_SPEC \
+ "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
+ %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "link_emulation", LINK_EMULATION },\
diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
index 04d12cadada..88c875a0980 100644
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
@@ -56,6 +56,11 @@ along with GCC; see the file COPYING3. If not see
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+#undef ASM_SPEC
+#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
+ %{Wa,*:%*} %{m32:--32} %{m64:--64} \
+ %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+
#if TARGET_64BIT_DEFAULT
#define SPEC_32 "m32"
#define SPEC_64 "!m32"
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index f6929706899..90ab0810fc1 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -192,7 +192,8 @@
return 0;
/* Consider all constants with -msoft-float to be easy. */
- if ((TARGET_SOFT_FLOAT || TARGET_E500_SINGLE)
+ if ((TARGET_SOFT_FLOAT || TARGET_E500_SINGLE
+ || (TARGET_HARD_FLOAT && (TARGET_SINGLE_FLOAT && ! TARGET_DOUBLE_FLOAT)))
&& mode != DImode)
return 1;
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index da1cb787169..10589bdc8e7 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -297,7 +297,8 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
builtin_define ("__PAIRED__");
if (TARGET_SOFT_FLOAT)
builtin_define ("_SOFT_FLOAT");
- if (!(TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)))
+ if ((!(TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)))
+ ||(TARGET_HARD_FLOAT && TARGET_FPRS && !TARGET_DOUBLE_FLOAT))
builtin_define ("_SOFT_DOUBLE");
/* Used by lwarx/stwcx. errata work-around. */
if (rs6000_cpu == PROCESSOR_PPC405)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 0940c2266b0..67b64fd0f2b 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1556,8 +1556,6 @@ rs6000_override_options (const char *default_cpu)
| MASK_DLMZB | MASK_CMPB | MASK_MFPGPR | MASK_DFP)
};
- rs6000_init_hard_regno_mode_ok ();
-
set_masks = POWER_MASKS | POWERPC_MASKS | MASK_SOFT_FLOAT;
#ifdef OS_MISSING_POWERPC64
if (OS_MISSING_POWERPC64)
@@ -1968,6 +1966,25 @@ rs6000_override_options (const char *default_cpu)
can be optimized to ap = __builtin_next_arg (0). */
if (DEFAULT_ABI != ABI_V4)
targetm.expand_builtin_va_start = NULL;
+
+ /* Set up single/double float flags.
+ If TARGET_HARD_FLOAT is set, but neither single or double is set,
+ then set both flags. */
+ if (TARGET_HARD_FLOAT && TARGET_FPRS
+ && rs6000_single_float == 0 && rs6000_double_float == 0)
+ rs6000_single_float = rs6000_double_float = 1;
+
+ /* Reset single and double FP flags if target is E500. */
+ if (TARGET_E500)
+ {
+ rs6000_single_float = rs6000_double_float = 0;
+ if (TARGET_E500_SINGLE)
+ rs6000_single_float = 1;
+ if (TARGET_E500_DOUBLE)
+ rs6000_single_float = rs6000_double_float = 1;
+ }
+
+ rs6000_init_hard_regno_mode_ok ();
}
/* Implement targetm.vectorize.builtin_mask_for_load. */
@@ -2477,6 +2494,37 @@ rs6000_handle_option (size_t code, const char *arg, int value)
return false;
}
break;
+
+ case OPT_msingle_float:
+ if (!TARGET_SINGLE_FPU)
+ warning (0, "-msingle-float option equivalent to -mhard-float");
+ /* -msingle-float implies -mno-double-float and TARGET_HARD_FLOAT. */
+ rs6000_double_float = 0;
+ target_flags &= ~MASK_SOFT_FLOAT;
+ target_flags_explicit |= MASK_SOFT_FLOAT;
+ break;
+
+ case OPT_mdouble_float:
+ /* -mdouble-float implies -msingle-float and TARGET_HARD_FLOAT. */
+ rs6000_single_float = 1;
+ target_flags &= ~MASK_SOFT_FLOAT;
+ target_flags_explicit |= MASK_SOFT_FLOAT;
+ break;
+
+ case OPT_msimple_fpu:
+ if (!TARGET_SINGLE_FPU)
+ warning (0, "-msimple-fpu option ignored");
+ break;
+
+ case OPT_mhard_float:
+ /* -mhard_float implies -msingle-float and -mdouble-float. */
+ rs6000_single_float = rs6000_double_float = 1;
+ break;
+
+ case OPT_msoft_float:
+ /* -msoft_float implies -mnosingle-float and -mnodouble-float. */
+ rs6000_single_float = rs6000_double_float = 0;
+ break;
}
return true;
}
@@ -2546,7 +2594,9 @@ rs6000_file_start (void)
if (TARGET_32BIT && DEFAULT_ABI == ABI_V4)
{
fprintf (file, "\t.gnu_attribute 4, %d\n",
- (TARGET_HARD_FLOAT && TARGET_FPRS) ? 1 : 2);
+ ((TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT) ? 1
+ : (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT) ? 3
+ : 2));
fprintf (file, "\t.gnu_attribute 8, %d\n",
(TARGET_ALTIVEC_ABI ? 2
: TARGET_SPE_ABI ? 3
@@ -3691,7 +3741,7 @@ legitimate_lo_sum_address_p (enum machine_mode mode, rtx x, int strict)
return false;
if (GET_MODE_BITSIZE (mode) > 64
|| (GET_MODE_BITSIZE (mode) > 32 && !TARGET_POWERPC64
- && !(TARGET_HARD_FLOAT && TARGET_FPRS
+ && !(TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& (mode == DFmode || mode == DDmode))))
return false;
@@ -3758,7 +3808,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
&& GET_CODE (XEXP (x, 0)) == REG
&& GET_CODE (XEXP (x, 1)) != CONST_INT
&& GET_MODE_NUNITS (mode) == 1
- && ((TARGET_HARD_FLOAT && TARGET_FPRS)
+ && ((TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
|| TARGET_POWERPC64
|| ((mode != DImode && mode != DFmode && mode != DDmode)
|| (TARGET_E500_DOUBLE && mode != DDmode)))
@@ -3827,7 +3877,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
&& CONSTANT_P (x)
&& GET_MODE_NUNITS (mode) == 1
&& (GET_MODE_BITSIZE (mode) <= 32
- || ((TARGET_HARD_FLOAT && TARGET_FPRS)
+ || ((TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
&& (mode == DFmode || mode == DDmode))))
{
rtx reg = gen_reg_rtx (Pmode);
@@ -3842,7 +3892,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
&& GET_CODE (x) != CONST_INT
&& GET_CODE (x) != CONST_DOUBLE
&& CONSTANT_P (x)
- && ((TARGET_HARD_FLOAT && TARGET_FPRS)
+ && ((TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
|| (mode != DFmode && mode != DDmode))
&& mode != DImode
&& mode != TImode)
@@ -4259,7 +4309,7 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode,
&& mode != TDmode
&& (mode != DImode || TARGET_POWERPC64)
&& ((mode != DFmode && mode != DDmode) || TARGET_POWERPC64
- || (TARGET_FPRS && TARGET_HARD_FLOAT)))
+ || (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)))
{
#if TARGET_MACHO
if (flag_pic)
@@ -4384,7 +4434,7 @@ rs6000_legitimate_address (enum machine_mode mode, rtx x, int reg_ok_strict)
&& mode != TImode
&& mode != TFmode
&& mode != TDmode
- && ((TARGET_HARD_FLOAT && TARGET_FPRS)
+ && ((TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
|| TARGET_POWERPC64
|| ((mode != DFmode && mode != DDmode) || TARGET_E500_DOUBLE))
&& (TARGET_POWERPC64 || mode != DImode)
@@ -4839,7 +4889,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
operands[1] = force_reg (mode, operands[1]);
if (mode == SFmode && ! TARGET_POWERPC
- && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& GET_CODE (operands[0]) == MEM)
{
int regnum;
@@ -5200,7 +5250,9 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
#define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \
(SCALAR_FLOAT_MODE_P (MODE) \
&& (CUM)->fregno <= FP_ARG_MAX_REG \
- && TARGET_HARD_FLOAT && TARGET_FPRS)
+ && TARGET_HARD_FLOAT && TARGET_FPRS \
+ && ((TARGET_DOUBLE_FLOAT && (MODE) == DFmode)\
+ || (TARGET_SINGLE_FLOAT && (MODE) == SFmode)))
/* Nonzero if we can use an AltiVec register to pass this arg. */
#define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE,NAMED) \
@@ -5677,9 +5729,9 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
else if (DEFAULT_ABI == ABI_V4)
{
if (TARGET_HARD_FLOAT && TARGET_FPRS
- && (mode == SFmode || mode == DFmode
+ && (mode == SFmode || mode == DFmode
|| mode == SDmode || mode == DDmode || mode == TDmode
- || (mode == TFmode && !TARGET_IEEEQUAD)))
+ || (mode == TFmode && !TARGET_IEEEQUAD)))
{
/* _Decimal128 must use an even/odd register pair. This assumes
that the register number is odd when fregno is odd. */
@@ -5745,7 +5797,9 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
cum->words = align_words + n_words;
if (SCALAR_FLOAT_MODE_P (mode)
- && TARGET_HARD_FLOAT && TARGET_FPRS)
+ && TARGET_HARD_FLOAT && TARGET_FPRS
+ && ((TARGET_DOUBLE_FLOAT && mode == DFmode)
+ || (TARGET_SINGLE_FLOAT && mode == SFmode)))
{
/* _Decimal128 must be passed in an even/odd float register pair.
This assumes that the register number is odd when fregno is
@@ -6701,11 +6755,17 @@ setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
fregno <= FP_ARG_V4_MAX_REG && nregs < cfun->va_list_fpr_size;
fregno++, off += UNITS_PER_FP_WORD, nregs++)
{
- mem = gen_rtx_MEM (DFmode, plus_constant (save_area, off));
- MEM_NOTRAP_P (mem) = 1;
- set_mem_alias_set (mem, set);
- set_mem_align (mem, GET_MODE_ALIGNMENT (DFmode));
- emit_move_insn (mem, gen_rtx_REG (DFmode, fregno));
+ mem = gen_rtx_MEM ((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode,
+ plus_constant (save_area, off));
+ MEM_NOTRAP_P (mem) = 1;
+ set_mem_alias_set (mem, set);
+ set_mem_align (mem, GET_MODE_ALIGNMENT (
+ (TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode));
+ emit_move_insn (mem, gen_rtx_REG (
+ (TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode, fregno));
}
emit_label (lab);
@@ -6920,18 +6980,19 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
align = 1;
if (TARGET_HARD_FLOAT && TARGET_FPRS
- && (TYPE_MODE (type) == SFmode
- || TYPE_MODE (type) == DFmode
- || TYPE_MODE (type) == TFmode
- || TYPE_MODE (type) == SDmode
- || TYPE_MODE (type) == DDmode
- || TYPE_MODE (type) == TDmode))
+ && ((TARGET_SINGLE_FLOAT && TYPE_MODE (type) == SFmode)
+ || (TARGET_DOUBLE_FLOAT
+ && (TYPE_MODE (type) == DFmode
+ || TYPE_MODE (type) == TFmode
+ || TYPE_MODE (type) == SDmode
+ || TYPE_MODE (type) == DDmode
+ || TYPE_MODE (type) == TDmode))))
{
/* FP args go in FP registers, if present. */
reg = fpr;
n_reg = (size + 7) / 8;
- sav_ofs = 8*4;
- sav_scale = 8;
+ sav_ofs = ((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT) ? 8 : 4) * 4;
+ sav_scale = ((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT) ? 8 : 4);
if (TYPE_MODE (type) != SFmode && TYPE_MODE (type) != SDmode)
align = 8;
}
@@ -14128,7 +14189,8 @@ rs6000_split_multireg_move (rtx dst, rtx src)
mode = GET_MODE (dst);
nregs = hard_regno_nregs[reg][mode];
if (FP_REGNO_P (reg))
- reg_mode = DECIMAL_FLOAT_MODE_P (mode) ? DDmode : DFmode;
+ reg_mode = DECIMAL_FLOAT_MODE_P (mode) ? DDmode :
+ ((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT) ? DFmode : SFmode);
else if (ALTIVEC_REGNO_P (reg))
reg_mode = V16QImode;
else if (TARGET_E500_DOUBLE && mode == TFmode)
@@ -16094,11 +16156,14 @@ rs6000_emit_prologue (void)
properly. */
for (i = 0; i < 64 - info->first_fp_reg_save; i++)
{
- rtx reg = gen_rtx_REG (DFmode, info->first_fp_reg_save + i);
+ rtx reg = gen_rtx_REG (((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode),
+ info->first_fp_reg_save + i);
rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
GEN_INT (info->fp_save_offset
+ sp_offset + 8 * i));
- rtx mem = gen_frame_mem (DFmode, addr);
+ rtx mem = gen_frame_mem (((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode), addr);
RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, mem, reg);
}
@@ -16205,7 +16270,9 @@ rs6000_emit_prologue (void)
for (i = 0; i < 64 - info->first_fp_reg_save; i++)
if ((df_regs_ever_live_p (info->first_fp_reg_save+i)
&& ! call_used_regs[info->first_fp_reg_save+i]))
- emit_frame_save (frame_reg_rtx, frame_ptr_rtx, DFmode,
+ emit_frame_save (frame_reg_rtx, frame_ptr_rtx,
+ (TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode,
info->first_fp_reg_save + i,
info->fp_save_offset + sp_offset + 8 * i,
info->total_size);
@@ -16850,11 +16917,14 @@ rs6000_emit_epilogue (int sibcall)
}
for (i = 0; info->first_fp_reg_save + i <= 63; i++)
{
- rtx reg = gen_rtx_REG (DFmode, info->first_fp_reg_save + i);
+ rtx reg = gen_rtx_REG (((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode),
+ info->first_fp_reg_save + i);
rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
GEN_INT (info->fp_save_offset
+ 8 * i));
- rtx mem = gen_frame_mem (DFmode, addr);
+ rtx mem = gen_frame_mem (((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode), addr);
RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, reg, mem);
}
@@ -17259,9 +17329,12 @@ rs6000_emit_epilogue (int sibcall)
GEN_INT (info->fp_save_offset
+ sp_offset
+ 8 * i));
- mem = gen_frame_mem (DFmode, addr);
+ mem = gen_frame_mem (((TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode), addr);
- emit_move_insn (gen_rtx_REG (DFmode,
+ emit_move_insn (gen_rtx_REG (((TARGET_HARD_FLOAT
+ && TARGET_DOUBLE_FLOAT)
+ ? DFmode : SFmode),
info->first_fp_reg_save + i),
mem);
}
@@ -22401,7 +22474,10 @@ rs6000_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
if (DECIMAL_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS)
/* _Decimal128 must use an even/odd register pair. */
regno = (mode == TDmode) ? FP_ARG_RETURN + 1 : FP_ARG_RETURN;
- else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS)
+ else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_FPRS
+ && (TARGET_HARD_FLOAT
+ && ((TARGET_SINGLE_FLOAT && mode == SFmode)
+ || TARGET_DOUBLE_FLOAT)))
regno = FP_ARG_RETURN;
else if (TREE_CODE (valtype) == COMPLEX_TYPE
&& targetm.calls.split_complex_arg)
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 2d5bbff39ab..627427a9739 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -298,6 +298,14 @@ enum processor_type
PROCESSOR_CELL
};
+/* FPU operations supported.
+ Each use of TARGET_SINGLE_FLOAT or TARGET_DOUBLE_FLOAT must
+ also test TARGET_HARD_FLOAT. */
+#define TARGET_SINGLE_FLOAT 1
+#define TARGET_DOUBLE_FLOAT 1
+#define TARGET_SINGLE_FPU 0
+#define TARGET_SIMPLE_FPU 0
+
extern enum processor_type rs6000_cpu;
/* Recast the processor type to the cpu attribute. */
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index fb55fc00962..9a4faa5b65a 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -202,8 +202,11 @@
(define_mode_iterator P [(SI "TARGET_32BIT") (DI "TARGET_64BIT")])
; Any hardware-supported floating-point mode
-(define_mode_iterator FP [(SF "TARGET_HARD_FLOAT")
- (DF "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)")
+(define_mode_iterator FP [
+ (SF "TARGET_HARD_FLOAT
+ && ((TARGET_FPRS && TARGET_SINGLE_FLOAT) || TARGET_E500_SINGLE)")
+ (DF "TARGET_HARD_FLOAT
+ && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)")
(TF "!TARGET_IEEEQUAD
&& TARGET_HARD_FLOAT
&& (TARGET_FPRS || TARGET_E500_DOUBLE)
@@ -5059,13 +5062,13 @@
(define_expand "extendsfdf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(float_extend:DF (match_operand:SF 1 "reg_or_none500mem_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"")
(define_insn_and_split "*extendsfdf2_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f,?f,f")
(float_extend:DF (match_operand:SF 1 "reg_or_mem_operand" "0,f,m")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"@
#
fmr %0,%1
@@ -5081,53 +5084,53 @@
(define_expand "truncdfsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"")
(define_insn "*truncdfsf2_fpr"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"frsp %0,%1"
[(set_attr "type" "fp")])
(define_insn "aux_truncdfsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] UNSPEC_FRSP))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"frsp %0,%1"
[(set_attr "type" "fp")])
(define_expand "negsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(neg:SF (match_operand:SF 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT && TARGET_SINGLE_FLOAT"
"")
(define_insn "*negsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(neg:SF (match_operand:SF 1 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fneg %0,%1"
[(set_attr "type" "fp")])
(define_expand "abssf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(abs:SF (match_operand:SF 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT && TARGET_SINGLE_FLOAT"
"")
(define_insn "*abssf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(abs:SF (match_operand:SF 1 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fabs %0,%1"
[(set_attr "type" "fp")])
(define_insn ""
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(neg:SF (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f"))))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fnabs %0,%1"
[(set_attr "type" "fp")])
@@ -5135,14 +5138,14 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(plus:SF (match_operand:SF 1 "gpc_reg_operand" "")
(match_operand:SF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT && TARGET_SINGLE_FLOAT"
"")
(define_insn ""
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+"TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fadds %0,%1,%2"
[(set_attr "type" "fp")])
@@ -5150,7 +5153,7 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"{fa|fadd} %0,%1,%2"
[(set_attr "type" "fp")])
@@ -5158,14 +5161,14 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(minus:SF (match_operand:SF 1 "gpc_reg_operand" "")
(match_operand:SF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT && TARGET_SINGLE_FLOAT"
"")
(define_insn ""
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(minus:SF (match_operand:SF 1 "gpc_reg_operand" "f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fsubs %0,%1,%2"
[(set_attr "type" "fp")])
@@ -5173,7 +5176,7 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(minus:SF (match_operand:SF 1 "gpc_reg_operand" "f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"{fs|fsub} %0,%1,%2"
[(set_attr "type" "fp")])
@@ -5181,14 +5184,14 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(mult:SF (match_operand:SF 1 "gpc_reg_operand" "")
(match_operand:SF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT && TARGET_SINGLE_FLOAT"
"")
(define_insn ""
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fmuls %0,%1,%2"
[(set_attr "type" "fp")])
@@ -5196,7 +5199,7 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"{fm|fmul} %0,%1,%2"
[(set_attr "type" "dmul")])
@@ -5204,14 +5207,15 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(div:SF (match_operand:SF 1 "gpc_reg_operand" "")
(match_operand:SF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT && TARGET_SINGLE_FLOAT && !TARGET_SIMPLE_FPU"
"")
(define_insn ""
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(div:SF (match_operand:SF 1 "gpc_reg_operand" "f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && !TARGET_SIMPLE_FPU"
"fdivs %0,%1,%2"
[(set_attr "type" "sdiv")])
@@ -5219,7 +5223,8 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(div:SF (match_operand:SF 1 "gpc_reg_operand" "f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && !TARGET_SIMPLE_FPU"
"{fd|fdiv} %0,%1,%2"
[(set_attr "type" "ddiv")])
@@ -5247,7 +5252,8 @@
(plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && TARGET_FUSED_MADD"
"fmadds %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5256,7 +5262,8 @@
(plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f")))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && TARGET_FUSED_MADD"
"{fma|fmadd} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5265,7 +5272,8 @@
(minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && TARGET_FUSED_MADD"
"fmsubs %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5274,7 +5282,8 @@
(minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f")))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && TARGET_FUSED_MADD"
"{fms|fmsub} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5284,7 +5293,7 @@
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f"))))]
"TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
- && HONOR_SIGNED_ZEROS (SFmode)"
+ && TARGET_SINGLE_FLOAT && HONOR_SIGNED_ZEROS (SFmode)"
"fnmadds %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5293,7 +5302,7 @@
(minus:SF (mult:SF (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f"))
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
+ "TARGET_POWERPC && TARGET_SINGLE_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
&& ! HONOR_SIGNED_ZEROS (SFmode)"
"fnmadds %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5303,7 +5312,8 @@
(neg:SF (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f"))))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && TARGET_FUSED_MADD"
"{fnma|fnmadd} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5313,7 +5323,7 @@
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f")))]
"! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
- && ! HONOR_SIGNED_ZEROS (SFmode)"
+ && TARGET_SINGLE_FLOAT && ! HONOR_SIGNED_ZEROS (SFmode)"
"{fnma|fnmadd} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5323,7 +5333,7 @@
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f"))))]
"TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
- && HONOR_SIGNED_ZEROS (SFmode)"
+ && TARGET_SINGLE_FLOAT && HONOR_SIGNED_ZEROS (SFmode)"
"fnmsubs %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5333,7 +5343,7 @@
(mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))))]
"TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
- && ! HONOR_SIGNED_ZEROS (SFmode)"
+ && TARGET_SINGLE_FLOAT && ! HONOR_SIGNED_ZEROS (SFmode)"
"fnmsubs %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5342,7 +5352,8 @@
(neg:SF (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))
(match_operand:SF 3 "gpc_reg_operand" "f"))))]
- "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && TARGET_FUSED_MADD"
"{fnms|fnmsub} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5352,27 +5363,31 @@
(mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
(match_operand:SF 2 "gpc_reg_operand" "f"))))]
"! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
- && ! HONOR_SIGNED_ZEROS (SFmode)"
+ && TARGET_SINGLE_FLOAT && ! HONOR_SIGNED_ZEROS (SFmode)"
"{fnms|fnmsub} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
(define_expand "sqrtsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "")))]
- "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "(TARGET_PPC_GPOPT || TARGET_POWER2)
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT
+ && !TARGET_SIMPLE_FPU"
"")
(define_insn ""
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))]
- "TARGET_PPC_GPOPT && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_PPC_GPOPT && TARGET_HARD_FLOAT
+ && TARGET_FPRS && TARGET_SINGLE_FLOAT && !TARGET_SIMPLE_FPU"
"fsqrts %0,%1"
[(set_attr "type" "ssqrt")])
(define_insn ""
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))]
- "TARGET_POWER2 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWER2 && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && !TARGET_SIMPLE_FPU"
"fsqrt %0,%1"
[(set_attr "type" "dsqrt")])
@@ -5405,7 +5420,7 @@
(match_dup 5))
(match_dup 3)
(match_dup 4)))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT
&& !HONOR_NANS (SFmode) && !HONOR_SIGNED_ZEROS (SFmode)"
{
operands[3] = gen_reg_rtx (SFmode);
@@ -5423,7 +5438,7 @@
(match_dup 5))
(match_dup 3)
(match_dup 4)))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& !HONOR_NANS (DFmode) && !HONOR_SIGNED_ZEROS (DFmode)"
{
operands[3] = gen_reg_rtx (DFmode);
@@ -5441,7 +5456,8 @@
(match_operand:SF 2 "gpc_reg_operand" ""))
(match_dup 1)
(match_dup 2)))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && !flag_trapping_math"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && !flag_trapping_math"
"{ rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]); DONE;}")
(define_expand "sminsf3"
@@ -5450,7 +5466,8 @@
(match_operand:SF 2 "gpc_reg_operand" ""))
(match_dup 2)
(match_dup 1)))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && !flag_trapping_math"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && !flag_trapping_math"
"{ rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]); DONE;}")
(define_split
@@ -5458,7 +5475,8 @@
(match_operator:SF 3 "min_max_operator"
[(match_operand:SF 1 "gpc_reg_operand" "")
(match_operand:SF 2 "gpc_reg_operand" "")]))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && !flag_trapping_math"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_SINGLE_FLOAT && !flag_trapping_math"
[(const_int 0)]
"
{ rs6000_emit_minmax (operands[0], GET_CODE (operands[3]),
@@ -5519,7 +5537,7 @@
(if_then_else:SF (match_operand 1 "comparison_operator" "")
(match_operand:SF 2 "gpc_reg_operand" "")
(match_operand:SF 3 "gpc_reg_operand" "")))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"
{
if (rs6000_emit_cmove (operands[0], operands[1], operands[2], operands[3]))
@@ -5534,7 +5552,7 @@
(match_operand:SF 4 "zero_fp_constant" "F"))
(match_operand:SF 2 "gpc_reg_operand" "f")
(match_operand:SF 3 "gpc_reg_operand" "f")))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fsel %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5544,40 +5562,40 @@
(match_operand:DF 4 "zero_fp_constant" "F"))
(match_operand:SF 2 "gpc_reg_operand" "f")
(match_operand:SF 3 "gpc_reg_operand" "f")))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fsel %0,%1,%2,%3"
[(set_attr "type" "fp")])
(define_expand "negdf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(neg:DF (match_operand:DF 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"")
(define_insn "*negdf2_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fneg %0,%1"
[(set_attr "type" "fp")])
(define_expand "absdf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(abs:DF (match_operand:DF 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"")
(define_insn "*absdf2_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(abs:DF (match_operand:DF 1 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fabs %0,%1"
[(set_attr "type" "fp")])
(define_insn "*nabsdf2_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(neg:DF (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f"))))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fnabs %0,%1"
[(set_attr "type" "fp")])
@@ -5585,14 +5603,14 @@
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(plus:DF (match_operand:DF 1 "gpc_reg_operand" "")
(match_operand:DF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"")
(define_insn "*adddf3_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(plus:DF (match_operand:DF 1 "gpc_reg_operand" "%f")
(match_operand:DF 2 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"{fa|fadd} %0,%1,%2"
[(set_attr "type" "fp")])
@@ -5600,14 +5618,14 @@
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(minus:DF (match_operand:DF 1 "gpc_reg_operand" "")
(match_operand:DF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"")
(define_insn "*subdf3_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(minus:DF (match_operand:DF 1 "gpc_reg_operand" "f")
(match_operand:DF 2 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"{fs|fsub} %0,%1,%2"
[(set_attr "type" "fp")])
@@ -5615,14 +5633,14 @@
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(mult:DF (match_operand:DF 1 "gpc_reg_operand" "")
(match_operand:DF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"")
(define_insn "*muldf3_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f")
(match_operand:DF 2 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"{fm|fmul} %0,%1,%2"
[(set_attr "type" "dmul")])
@@ -5630,14 +5648,14 @@
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(div:DF (match_operand:DF 1 "gpc_reg_operand" "")
(match_operand:DF 2 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE) && !TARGET_SIMPLE_FPU"
"")
(define_insn "*divdf3_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(div:DF (match_operand:DF 1 "gpc_reg_operand" "f")
(match_operand:DF 2 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && !TARGET_SIMPLE_FPU"
"{fd|fdiv} %0,%1,%2"
[(set_attr "type" "ddiv")])
@@ -5665,7 +5683,7 @@
(plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f")
(match_operand:DF 2 "gpc_reg_operand" "f"))
(match_operand:DF 3 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT"
"{fma|fmadd} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5674,7 +5692,7 @@
(minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f")
(match_operand:DF 2 "gpc_reg_operand" "f"))
(match_operand:DF 3 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT"
"{fms|fmsub} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5683,7 +5701,7 @@
(neg:DF (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f")
(match_operand:DF 2 "gpc_reg_operand" "f"))
(match_operand:DF 3 "gpc_reg_operand" "f"))))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT
&& HONOR_SIGNED_ZEROS (DFmode)"
"{fnma|fnmadd} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5693,7 +5711,7 @@
(minus:DF (mult:DF (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f"))
(match_operand:DF 2 "gpc_reg_operand" "f"))
(match_operand:DF 3 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT
&& ! HONOR_SIGNED_ZEROS (DFmode)"
"{fnma|fnmadd} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5703,7 +5721,7 @@
(neg:DF (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f")
(match_operand:DF 2 "gpc_reg_operand" "f"))
(match_operand:DF 3 "gpc_reg_operand" "f"))))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT
&& HONOR_SIGNED_ZEROS (DFmode)"
"{fnms|fnmsub} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5713,7 +5731,7 @@
(minus:DF (match_operand:DF 3 "gpc_reg_operand" "f")
(mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f")
(match_operand:DF 2 "gpc_reg_operand" "f"))))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT
&& ! HONOR_SIGNED_ZEROS (DFmode)"
"{fnms|fnmsub} %0,%1,%2,%3"
[(set_attr "type" "dmul")])
@@ -5721,7 +5739,8 @@
(define_insn "sqrtdf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "f")))]
- "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_DOUBLE_FLOAT"
"fsqrt %0,%1"
[(set_attr "type" "dsqrt")])
@@ -5734,7 +5753,8 @@
(match_operand:DF 2 "gpc_reg_operand" ""))
(match_dup 1)
(match_dup 2)))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && !flag_trapping_math"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
+ && !flag_trapping_math"
"{ rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]); DONE;}")
(define_expand "smindf3"
@@ -5743,7 +5763,8 @@
(match_operand:DF 2 "gpc_reg_operand" ""))
(match_dup 2)
(match_dup 1)))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && !flag_trapping_math"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
+ && !flag_trapping_math"
"{ rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]); DONE;}")
(define_split
@@ -5751,7 +5772,8 @@
(match_operator:DF 3 "min_max_operator"
[(match_operand:DF 1 "gpc_reg_operand" "")
(match_operand:DF 2 "gpc_reg_operand" "")]))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && !flag_trapping_math"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
+ && !flag_trapping_math"
[(const_int 0)]
"
{ rs6000_emit_minmax (operands[0], GET_CODE (operands[3]),
@@ -5764,7 +5786,7 @@
(if_then_else:DF (match_operand 1 "comparison_operator" "")
(match_operand:DF 2 "gpc_reg_operand" "")
(match_operand:DF 3 "gpc_reg_operand" "")))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"
{
if (rs6000_emit_cmove (operands[0], operands[1], operands[2], operands[3]))
@@ -5779,7 +5801,7 @@
(match_operand:DF 4 "zero_fp_constant" "F"))
(match_operand:DF 2 "gpc_reg_operand" "f")
(match_operand:DF 3 "gpc_reg_operand" "f")))]
- "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fsel %0,%1,%2,%3"
[(set_attr "type" "fp")])
@@ -5798,13 +5820,13 @@
(define_expand "fixuns_truncsfsi2"
[(set (match_operand:SI 0 "gpc_reg_operand" "")
(unsigned_fix:SI (match_operand:SF 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && !TARGET_FPRS"
+ "TARGET_HARD_FLOAT && !TARGET_FPRS && TARGET_SINGLE_FLOAT"
"")
(define_expand "fix_truncsfsi2"
[(set (match_operand:SI 0 "gpc_reg_operand" "")
(fix:SI (match_operand:SF 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && !TARGET_FPRS"
+ "TARGET_HARD_FLOAT && !TARGET_FPRS && TARGET_SINGLE_FLOAT"
"")
; For each of these conversions, there is a define_expand, a define_insn
@@ -5820,7 +5842,8 @@
(clobber (match_dup 4))
(clobber (match_dup 5))
(clobber (match_dup 6))])]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT
+ && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"
{
if (TARGET_E500_DOUBLE)
@@ -5850,7 +5873,7 @@
(clobber (match_operand:DF 4 "offsettable_mem_operand" "=o"))
(clobber (match_operand:DF 5 "gpc_reg_operand" "=&f"))
(clobber (match_operand:SI 6 "gpc_reg_operand" "=&r"))]
- "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"#"
"&& (can_create_pseudo_p () || offsettable_nonstrict_memref_p (operands[4]))"
[(pc)]
@@ -5879,7 +5902,7 @@
(define_expand "floatunssisf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(unsigned_float:SF (match_operand:SI 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && !TARGET_FPRS"
+ "TARGET_HARD_FLOAT && !TARGET_FPRS && TARGET_SINGLE_FLOAT"
"")
(define_expand "floatunssidf2"
@@ -5889,7 +5912,7 @@
(use (match_dup 3))
(clobber (match_dup 4))
(clobber (match_dup 5))])]
- "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ "TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"
{
if (TARGET_E500_DOUBLE)
@@ -5917,7 +5940,7 @@
(use (match_operand:DF 3 "gpc_reg_operand" "f"))
(clobber (match_operand:DF 4 "offsettable_mem_operand" "=o"))
(clobber (match_operand:DF 5 "gpc_reg_operand" "=&f"))]
- "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"#"
"&& (can_create_pseudo_p () || offsettable_nonstrict_memref_p (operands[4]))"
[(pc)]
@@ -5947,7 +5970,7 @@
(clobber (match_dup 2))
(clobber (match_dup 3))])]
"(TARGET_POWER2 || TARGET_POWERPC)
- && TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)"
+ && TARGET_HARD_FLOAT && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT) || TARGET_E500_DOUBLE)"
"
{
if (TARGET_E500_DOUBLE)
@@ -5983,7 +6006,8 @@
(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f")))
(clobber (match_operand:DI 2 "gpc_reg_operand" "=f"))
(clobber (match_operand:DI 3 "offsettable_mem_operand" "=o"))]
- "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_DOUBLE_FLOAT"
"#"
"&& (can_create_pseudo_p () || offsettable_nonstrict_memref_p (operands[3]))"
[(pc)]
@@ -6004,7 +6028,8 @@
[(set (match_operand:SI 0 "memory_operand" "=Z")
(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f")))
(clobber (match_operand:DI 2 "gpc_reg_operand" "=f"))]
- "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS
+ "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_DOUBLE_FLOAT
&& TARGET_PPC_GFXOPT"
"#"
"&& 1"
@@ -6022,7 +6047,8 @@
(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f")))
(clobber (match_operand:DI 2 "gpc_reg_operand" "=f"))
(clobber (match_operand:DI 3 "gpc_reg_operand" "=r"))]
- "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_DOUBLE_FLOAT"
"#"
"&& 1"
[(set (match_dup 2) (unspec:DI [(fix:SI (match_dup 1))] UNSPEC_FCTIWZ))
@@ -6039,63 +6065,64 @@
[(set (match_operand:DI 0 "gpc_reg_operand" "=f")
(unspec:DI [(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))]
UNSPEC_FCTIWZ))]
- "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_DOUBLE_FLOAT"
"{fcirz|fctiwz} %0,%1"
[(set_attr "type" "fp")])
(define_insn "btruncdf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIZ))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"friz %0,%1"
[(set_attr "type" "fp")])
(define_insn "btruncsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] UNSPEC_FRIZ))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT "
"friz %0,%1"
[(set_attr "type" "fp")])
(define_insn "ceildf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIP))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"frip %0,%1"
[(set_attr "type" "fp")])
(define_insn "ceilsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] UNSPEC_FRIP))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT "
"frip %0,%1"
[(set_attr "type" "fp")])
(define_insn "floordf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIM))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"frim %0,%1"
[(set_attr "type" "fp")])
(define_insn "floorsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] UNSPEC_FRIM))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT "
"frim %0,%1"
[(set_attr "type" "fp")])
(define_insn "rounddf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIN))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"frin %0,%1"
[(set_attr "type" "fp")])
(define_insn "roundsf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] UNSPEC_FRIN))]
- "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT "
"frin %0,%1"
[(set_attr "type" "fp")])
@@ -6111,27 +6138,27 @@
(define_expand "floatsisf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(float:SF (match_operand:SI 1 "gpc_reg_operand" "")))]
- "TARGET_HARD_FLOAT && !TARGET_FPRS"
+ "TARGET_HARD_FLOAT && (!TARGET_FPRS || TARGET_SINGLE_FPU)"
"")
(define_insn "floatdidf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(float:DF (match_operand:DI 1 "gpc_reg_operand" "!f#r")))]
- "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fcfid %0,%1"
[(set_attr "type" "fp")])
(define_insn "fix_truncdfdi2"
[(set (match_operand:DI 0 "gpc_reg_operand" "=!f#r")
(fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))]
- "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fctidz %0,%1"
[(set_attr "type" "fp")])
(define_expand "floatdisf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(float:SF (match_operand:DI 1 "gpc_reg_operand" "")))]
- "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT "
"
{
rtx val = operands[1];
@@ -6153,7 +6180,7 @@
[(set (match_operand:SF 0 "gpc_reg_operand" "=f")
(float:SF (match_operand:DI 1 "gpc_reg_operand" "!f#r")))
(clobber (match_scratch:DF 2 "=f"))]
- "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"#"
"&& reload_completed"
[(set (match_dup 2)
@@ -6187,7 +6214,7 @@
(label_ref (match_operand:DI 2 "" ""))
(pc)))
(set (match_dup 0) (match_dup 1))]
- "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"
{
operands[3] = gen_reg_rtx (DImode);
@@ -8219,7 +8246,7 @@
(match_operand:SF 1 "input_operand" "r,m,r,f,m,f,r,r,h,0,G,Fn"))]
"(gpc_reg_operand (operands[0], SFmode)
|| gpc_reg_operand (operands[1], SFmode))
- && (TARGET_HARD_FLOAT && TARGET_FPRS)"
+ && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
"@
mr %0,%1
{l%U1%X1|lwz%U1%X1} %0,%1
@@ -8357,7 +8384,7 @@
(define_insn "*movdf_hardfloat32"
[(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,f,f,m,!r,!r,!r")
(match_operand:DF 1 "input_operand" "r,m,r,f,m,f,G,H,F"))]
- "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
"*
@@ -8452,7 +8479,9 @@
(define_insn "*movdf_softfloat32"
[(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m,r,r,r")
(match_operand:DF 1 "input_operand" "r,m,r,G,H,F"))]
- "! TARGET_POWERPC64 && (TARGET_SOFT_FLOAT || TARGET_E500_SINGLE)
+ "! TARGET_POWERPC64
+ && ((TARGET_FPRS && !TARGET_DOUBLE_FLOAT)
+ || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE)
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
"*
@@ -8495,7 +8524,8 @@
(define_insn "*movdf_hardfloat64_mfpgpr"
[(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r,r,f")
(match_operand:DF 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F,f,r"))]
- "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
+ "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_DOUBLE_FLOAT
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
"@
@@ -8521,7 +8551,8 @@
(define_insn "*movdf_hardfloat64"
[(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r")
(match_operand:DF 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F"))]
- "TARGET_POWERPC64 && !TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
+ "TARGET_POWERPC64 && !TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_DOUBLE_FLOAT
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
"@
@@ -8614,7 +8645,8 @@
(float_extend:TF (match_operand:DF 1 "input_operand" "")))
(use (match_dup 2))])]
"!TARGET_IEEEQUAD
- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
+ && TARGET_LONG_DOUBLE_128"
{
operands[2] = CONST0_RTX (DFmode);
/* Generate GOT reference early for SVR4 PIC. */
@@ -8627,7 +8659,8 @@
(float_extend:TF (match_operand:DF 1 "input_operand" "fr,mf,mf,rmGHF")))
(use (match_operand:DF 2 "zero_reg_mem_operand" "rf,m,f,n"))]
"!TARGET_IEEEQUAD
- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
+ && TARGET_LONG_DOUBLE_128"
"#"
"&& reload_completed"
[(pc)]
@@ -8684,7 +8717,8 @@
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
(float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))]
"!TARGET_IEEEQUAD && TARGET_XL_COMPAT
- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
+ && TARGET_LONG_DOUBLE_128"
"fadd %0,%1,%L1"
[(set_attr "type" "fp")])
@@ -8708,7 +8742,8 @@
(float_truncate:SF (match_operand:TF 1 "gpc_reg_operand" "f")))
(clobber (match_scratch:DF 2 "=f"))]
"!TARGET_IEEEQUAD
- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT
+ && TARGET_LONG_DOUBLE_128"
"#"
"&& reload_completed"
[(set (match_dup 2)
@@ -8738,7 +8773,7 @@
(unspec:DF [(match_operand:TF 1 "gpc_reg_operand" "f")]
UNSPEC_FIX_TRUNC_TF))
(clobber (match_operand:DF 2 "gpc_reg_operand" "=&f"))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"mffs %2\n\tmtfsb1 31\n\tmtfsb0 30\n\tfadd %0,%1,%L1\n\tmtfsf 1,%2"
[(set_attr "type" "fp")
(set_attr "length" "20")])
@@ -8859,7 +8894,8 @@
(pc)))
(set (match_dup 6) (neg:DF (match_dup 6)))]
"!TARGET_IEEEQUAD
- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
+ && TARGET_LONG_DOUBLE_128"
"
{
const int hi_word = FLOAT_WORDS_BIG_ENDIAN ? 0 : GET_MODE_SIZE (DFmode);
@@ -10010,7 +10046,7 @@
(match_operand:SI 2 "reg_or_short_operand" "r,I"))))
(set (match_operand:SI 0 "gpc_reg_operand" "=b,b")
(plus:SI (match_dup 1) (match_dup 2)))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT && TARGET_UPDATE"
"@
lfsux %3,%0,%2
lfsu %3,%2(%0)"
@@ -10022,7 +10058,7 @@
(match_operand:SF 3 "gpc_reg_operand" "f,f"))
(set (match_operand:SI 0 "gpc_reg_operand" "=b,b")
(plus:SI (match_dup 1) (match_dup 2)))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT && TARGET_UPDATE"
"@
stfsux %3,%0,%2
stfsu %3,%2(%0)"
@@ -10058,7 +10094,7 @@
(match_operand:SI 2 "reg_or_short_operand" "r,I"))))
(set (match_operand:SI 0 "gpc_reg_operand" "=b,b")
(plus:SI (match_dup 1) (match_dup 2)))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_UPDATE"
"@
lfdux %3,%0,%2
lfdu %3,%2(%0)"
@@ -10070,7 +10106,7 @@
(match_operand:DF 3 "gpc_reg_operand" "f,f"))
(set (match_operand:SI 0 "gpc_reg_operand" "=b,b")
(plus:SI (match_dup 1) (match_dup 2)))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_UPDATE"
"@
stfdux %3,%0,%2
stfdu %3,%2(%0)"
@@ -10091,7 +10127,7 @@
(set (match_operand:DF 2 "gpc_reg_operand" "")
(match_operand:DF 3 "memory_operand" ""))]
"TARGET_POWER2
- && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& registers_ok_for_quad_peep (operands[0], operands[2])
&& mems_ok_for_quad_peep (operands[1], operands[3])"
[(set (match_dup 0)
@@ -10113,7 +10149,7 @@
(set (match_operand:DF 2 "memory_operand" "")
(match_operand:DF 3 "gpc_reg_operand" ""))]
"TARGET_POWER2
- && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& registers_ok_for_quad_peep (operands[1], operands[3])
&& mems_ok_for_quad_peep (operands[0], operands[2])"
[(set (match_dup 0)
@@ -11917,7 +11953,7 @@
[(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
(compare:CCFP (match_operand:SF 1 "gpc_reg_operand" "f")
(match_operand:SF 2 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
"fcmpu %0,%1,%2"
[(set_attr "type" "fpcompare")])
@@ -11925,7 +11961,7 @@
[(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
(compare:CCFP (match_operand:DF 1 "gpc_reg_operand" "f")
(match_operand:DF 2 "gpc_reg_operand" "f")))]
- "TARGET_HARD_FLOAT && TARGET_FPRS"
+ "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
"fcmpu %0,%1,%2"
[(set_attr "type" "fpcompare")])
@@ -11935,7 +11971,7 @@
(compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f")
(match_operand:TF 2 "gpc_reg_operand" "f")))]
"!TARGET_IEEEQUAD && !TARGET_XL_COMPAT
- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LONG_DOUBLE_128"
"fcmpu %0,%1,%2\;bne %0,$+8\;fcmpu %0,%L1,%L2"
[(set_attr "type" "fpcompare")
(set_attr "length" "12")])
@@ -11953,7 +11989,7 @@
(clobber (match_scratch:DF 9 "=f"))
(clobber (match_scratch:DF 10 "=f"))]
"!TARGET_IEEEQUAD && TARGET_XL_COMPAT
- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+ && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LONG_DOUBLE_128"
"#"
"&& reload_completed"
[(set (match_dup 3) (match_dup 13))
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 6ad682fad2b..c036aeca441 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -260,3 +260,15 @@ Specify alignment of structure fields default/natural
mprioritize-restricted-insns=
Target RejectNegative Joined UInteger Var(rs6000_sched_restricted_insns_priority)
Specify scheduling priority for dispatch slot restricted insns
+
+msingle-float
+Target RejectNegative Var(rs6000_single_float)
+Single-precision floating point unit
+
+mdouble-float
+Target RejectNegative Var(rs6000_double_float)
+Double-precision floating point unit
+
+msimple-fpu
+Target RejectNegative Var(rs6000_simple_fpu)
+Floating point unit does not support divide & sqrt
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8c722d80e9f..2438bd6941e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,22 @@
+2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c++/37683
+ * parser.c (cp_parser_selection_statement): Fix uninitialized
+ variable.
+
+2008-09-30 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/37555
+ PR c++/37556
+ * decl.c (grokdeclarator): Set the type for typedefs to a
+ nested-name-specifier to error_mark_node.
+
+2008-09-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * parser.c (cp_parser_selection_statement): Implement here the
+ -Wempty-body warning for `if' and `else' statements.
+ * semantics.c (finish_if_stmt): Do not call empty_body_warning.
+
2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37649
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 82e0bba649f..be28e788600 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8679,8 +8679,10 @@ grokdeclarator (const cp_declarator *declarator,
decl = build_lang_decl (TYPE_DECL, unqualified_id, type);
else
decl = build_decl (TYPE_DECL, unqualified_id, type);
- if (id_declarator && declarator->u.id.qualifying_scope)
+ if (id_declarator && declarator->u.id.qualifying_scope) {
error ("%Jtypedef name may not be a nested-name-specifier", decl);
+ TREE_TYPE (decl) = error_mark_node;
+ }
if (decl_context != FIELD)
{
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index f28c76d9177..519c1d601d1 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7155,7 +7155,18 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p)
/* Parse the then-clause. */
in_statement = parser->in_statement;
parser->in_statement |= IN_IF_STMT;
- cp_parser_implicitly_scoped_statement (parser, &nested_if);
+ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
+ {
+ location_t loc = cp_lexer_peek_token (parser->lexer)->location;
+ add_stmt (build_empty_stmt ());
+ cp_lexer_consume_token (parser->lexer);
+ if (!cp_lexer_next_token_is_keyword (parser->lexer, RID_ELSE))
+ warning_at (loc, OPT_Wempty_body, "suggest braces around "
+ "empty body in an %<if%> statement");
+ nested_if = false;
+ }
+ else
+ cp_parser_implicitly_scoped_statement (parser, &nested_if);
parser->in_statement = in_statement;
finish_then_clause (statement);
@@ -7168,7 +7179,17 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p)
cp_lexer_consume_token (parser->lexer);
begin_else_clause (statement);
/* Parse the else-clause. */
- cp_parser_implicitly_scoped_statement (parser, NULL);
+ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
+ {
+ warning_at (cp_lexer_peek_token (parser->lexer)->location,
+ OPT_Wempty_body, "suggest braces around "
+ "empty body in an %<else%> statement");
+ add_stmt (build_empty_stmt ());
+ cp_lexer_consume_token (parser->lexer);
+ }
+ else
+ cp_parser_implicitly_scoped_statement (parser, NULL);
+
finish_else_clause (statement);
/* If we are currently parsing a then-clause, then
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 176a7fdd98a..13e9a0f56ab 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -695,7 +695,6 @@ finish_if_stmt (tree if_stmt)
TREE_CHAIN (if_stmt) = NULL;
add_stmt (do_poplevel (scope));
finish_stmt ();
- empty_if_body_warning (THEN_CLAUSE (if_stmt), ELSE_CLAUSE (if_stmt));
}
/* Begin a while-statement. Returns a newly created WHILE_STMT if
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c13f2a2638d..6d9ebf167b6 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -582,7 +582,7 @@ Objective-C and Objective-C++ Dialects}.
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
-mcmodel=@var{code-model} @gol
-m32 -m64 -mlarge-data-threshold=@var{num} @gol
--mfused-madd -mno-fused-madd}
+-mfused-madd -mno-fused-madd -msse2avx}
@emph{IA-64 Options}
@gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
@@ -716,6 +716,7 @@ See RS/6000 and PowerPC Options.
-m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol
-malign-power -malign-natural @gol
-msoft-float -mhard-float -mmultiple -mno-multiple @gol
+-msingle-float -mdouble-float -msimple-fpu @gol
-mstring -mno-string -mupdate -mno-update @gol
-mfused-madd -mno-fused-madd -mbit-align -mno-bit-align @gol
-mstrict-align -mno-strict-align -mrelocatable @gol
@@ -11217,6 +11218,12 @@ Enable automatic generation of fused floating point multiply-add instructions
if the ISA supports such instructions. The -mfused-madd option is on by
default. The fused multiply-add instructions have a different
rounding behavior compared to executing a multiply followed by an add.
+
+@item -msse2avx
+@itemx -mno-sse2avx
+@opindex msse2avx
+Specify that the assembler should encode SSE instructions with VEX
+prefix. The option @option{-mavx} turns this on by default.
@end table
These @samp{-m} switches are supported in addition to the above
@@ -13424,7 +13431,8 @@ following options:
@gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol
-mnew-mnemonics -mpopcntb -mpower -mpower2 -mpowerpc64 @gol
--mpowerpc-gpopt -mpowerpc-gfxopt -mstring -mmulhw -mdlmzb -mmfpgpr}
+-mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol
+-msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr}
The particular options set for any particular CPU will vary between
compiler versions, depending on what setting seems to produce optimal
@@ -13641,6 +13649,17 @@ Generate code that does not use (uses) the floating-point register set.
Software floating point emulation is provided if you use the
@option{-msoft-float} option, and pass the option to GCC when linking.
+@item -msingle-float
+@itemx -mdouble-float
+@opindex msingle-float
+@opindex mdouble-float
+Generate code for single or double-precision floating point operations.
+@option{-mdouble-float} implies @option{-msingle-float}.
+
+@item -msimple-fpu
+@opindex msimple-fpu
+Do not generate sqrt and div instructions for hardware floating point unit.
+
@item -mmultiple
@itemx -mno-multiple
@opindex mmultiple
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 98b98a80802..e39e687edbb 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -4990,7 +4990,7 @@ static void record_comdat_symbol_number (dw_die_ref, htab_t, unsigned);
static void add_sibling_attributes (dw_die_ref);
static void build_abbrev_table (dw_die_ref);
static void output_location_lists (dw_die_ref);
-static int constant_size (long unsigned);
+static int constant_size (unsigned HOST_WIDE_INT);
static unsigned long size_of_die (dw_die_ref);
static void calc_die_sizes (dw_die_ref);
static void mark_dies (dw_die_ref);
@@ -7507,7 +7507,7 @@ build_abbrev_table (dw_die_ref die)
/* Return the power-of-two number of bytes necessary to represent VALUE. */
static int
-constant_size (long unsigned int value)
+constant_size (unsigned HOST_WIDE_INT value)
{
int log;
diff --git a/gcc/expr.c b/gcc/expr.c
index ae0daf0b251..32c8d01fe7f 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7744,13 +7744,13 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
case ARRAY_RANGE_REF:
normal_inner_ref:
{
- enum machine_mode mode1;
+ enum machine_mode mode1, mode2;
HOST_WIDE_INT bitsize, bitpos;
tree offset;
- int volatilep = 0;
+ int volatilep = 0, must_force_mem;
tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset,
&mode1, &unsignedp, &volatilep, true);
- rtx orig_op0;
+ rtx orig_op0, memloc;
/* If we got back the original object, something is wrong. Perhaps
we are evaluating an expression too early. In any event, don't
@@ -7760,7 +7760,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
/* If TEM's type is a union of variable size, pass TARGET to the inner
computation, since it will need a temporary and TARGET is known
to have to do. This occurs in unchecked conversion in Ada. */
-
orig_op0 = op0
= expand_expr (tem,
(TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
@@ -7774,45 +7773,47 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|| modifier == EXPAND_STACK_PARM)
? modifier : EXPAND_NORMAL);
- /* If this is a constant, put it into a register if it is a legitimate
- constant, OFFSET is 0, and we won't try to extract outside the
- register (in case we were passed a partially uninitialized object
- or a view_conversion to a larger size) or a BLKmode piece of it
- (e.g. if it is unchecked-converted to a record type in Ada). Force
- the constant to memory otherwise. */
- if (CONSTANT_P (op0))
- {
- enum machine_mode mode = TYPE_MODE (TREE_TYPE (tem));
- if (mode != BLKmode && LEGITIMATE_CONSTANT_P (op0)
- && offset == 0
- && mode1 != BLKmode
- && bitpos + bitsize <= GET_MODE_BITSIZE (mode))
- op0 = force_reg (mode, op0);
- else
- op0 = validize_mem (force_const_mem (mode, op0));
- }
-
- /* Otherwise, if this object not in memory and we either have an
- offset, a BLKmode result, or a reference outside the object, put it
- there. Such cases can occur in Ada if we have unchecked conversion
- of an expression from a scalar type to an array or record type or
- for an ARRAY_RANGE_REF whose type is BLKmode. */
- else if (!MEM_P (op0)
- && (offset != 0
- || mode1 == BLKmode
- || (bitpos + bitsize
- > GET_MODE_BITSIZE (GET_MODE (op0)))))
+ mode2
+ = CONSTANT_P (op0) ? TYPE_MODE (TREE_TYPE (tem)) : GET_MODE (op0);
+
+ /* If we have either an offset, a BLKmode result, or a reference
+ outside the underlying object, we must force it to memory.
+ Such a case can occur in Ada if we have unchecked conversion
+ of an expression from a scalar type to an aggregate type or
+ for an ARRAY_RANGE_REF whose type is BLKmode, or if we were
+ passed a partially uninitialized object or a view-conversion
+ to a larger size. */
+ must_force_mem = (offset
+ || mode1 == BLKmode
+ || bitpos + bitsize > GET_MODE_BITSIZE (mode2));
+
+ /* If this is a constant, put it in a register if it is a legitimate
+ constant and we don't need a memory reference. */
+ if (CONSTANT_P (op0)
+ && mode2 != BLKmode
+ && LEGITIMATE_CONSTANT_P (op0)
+ && !must_force_mem)
+ op0 = force_reg (mode2, op0);
+
+ /* Otherwise, if this is a constant, try to force it to the constant
+ pool. Note that back-ends, e.g. MIPS, may refuse to do so if it
+ is a legitimate constant. */
+ else if (CONSTANT_P (op0) && (memloc = force_const_mem (mode2, op0)))
+ op0 = validize_mem (memloc);
+
+ /* Otherwise, if this is a constant or the object is not in memory
+ and need be, put it there. */
+ else if (CONSTANT_P (op0) || (!MEM_P (op0) && must_force_mem))
{
tree nt = build_qualified_type (TREE_TYPE (tem),
(TYPE_QUALS (TREE_TYPE (tem))
| TYPE_QUAL_CONST));
- rtx memloc = assign_temp (nt, 1, 1, 1);
-
+ memloc = assign_temp (nt, 1, 1, 1);
emit_move_insn (memloc, op0);
op0 = memloc;
}
- if (offset != 0)
+ if (offset)
{
rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode,
EXPAND_SUM);
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 389f8faa09e..253caa2b8d1 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,13 @@
+2008-09-30 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/36592
+ * symbol.c (check_conflict): If a symbol in a COMMON block is a
+ procedure, it must be a procedure pointer.
+ (gfc_add_in_common): Symbols in COMMON blocks may be variables or
+ procedure pointers.
+ * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
+ blocks work.
+
2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
PR fortran/37498
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 37f07dfaa84..42df574ebcc 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -636,10 +636,12 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf2 (threadprivate);
}
+ if (!attr->proc_pointer)
+ conf2 (in_common);
+
switch (attr->proc)
{
case PROC_ST_FUNCTION:
- conf2 (in_common);
conf2 (dummy);
break;
@@ -649,7 +651,6 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
case PROC_DUMMY:
conf2 (result);
- conf2 (in_common);
conf2 (threadprivate);
break;
@@ -1133,13 +1134,7 @@ gfc_add_in_common (symbol_attribute *attr, const char *name, locus *where)
/* Duplicate attribute already checked for. */
attr->in_common = 1;
- if (check_conflict (attr, name, where) == FAILURE)
- return FAILURE;
-
- if (attr->flavor == FL_VARIABLE)
- return SUCCESS;
-
- return gfc_add_flavor (attr, FL_VARIABLE, name, where);
+ return check_conflict (attr, name, where);
}
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 8178ae39f05..c3d2a918040 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -1627,6 +1627,16 @@ gfc_sym_type (gfc_symbol * sym)
tree type;
int byref;
+ /* Procedure Pointers inside COMMON blocks. */
+ if (sym->attr.proc_pointer && sym->attr.in_common)
+ {
+ /* Unset proc_pointer as gfc_get_function_type calls gfc_sym_type. */
+ sym->attr.proc_pointer = 0;
+ type = build_pointer_type (gfc_get_function_type (sym));
+ sym->attr.proc_pointer = 1;
+ return type;
+ }
+
if (sym->attr.flavor == FL_PROCEDURE && !sym->attr.function)
return void_type_node;
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 341174ab02f..a0b49a3979c 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -666,7 +666,15 @@ noce_emit_store_flag (struct noce_if_info *if_info, rtx x, int reversep,
build the store_flag insn directly. */
if (cond_complex)
- cond = XEXP (SET_SRC (pc_set (if_info->jump)), 0);
+ {
+ rtx set = pc_set (if_info->jump);
+ cond = XEXP (SET_SRC (set), 0);
+ if (GET_CODE (XEXP (SET_SRC (set), 2)) == LABEL_REF
+ && XEXP (XEXP (SET_SRC (set), 2), 0) == JUMP_LABEL (if_info->jump))
+ reversep = !reversep;
+ if (if_info->then_else_reversed)
+ reversep = !reversep;
+ }
if (reversep)
code = reversed_comparison_code (cond, if_info->jump);
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 93457c162c0..684f8596c80 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2187,17 +2187,19 @@ alter_reg (int i, int from_reg, bool dont_share_p)
stack_slot = x;
if (BYTES_BIG_ENDIAN)
- /* Cancel the big-endian correction done in assign_stack_local.
- Get the address of the beginning of the slot.
- This is so we can do a big-endian correction unconditionally
- below. */
- adjust = inherent_size - total_size;
- if (adjust)
- stack_slot
- = adjust_address_nv (x, mode_for_size (total_size
- * BITS_PER_UNIT,
- MODE_INT, 1),
- adjust);
+ {
+ /* Cancel the big-endian correction done in assign_stack_local.
+ Get the address of the beginning of the slot.
+ This is so we can do a big-endian correction unconditionally
+ below. */
+ adjust = inherent_size - total_size;
+ if (adjust)
+ stack_slot
+ = adjust_address_nv (x, mode_for_size (total_size
+ * BITS_PER_UNIT,
+ MODE_INT, 1),
+ adjust);
+ }
/* Nothing can alias this slot except this pseudo. */
set_mem_alias_set (x, alias_set);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 26d16dd827d..755a9701033 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,50 @@
+2008-10-01 Kai Tietz <kai.tietz@onevision.com>
+
+ * g++.dg/abi/offsetof.C (main): Use __SIZE_TYPE__ instead of
+ unsigned long for pointer cast.
+ * g++.dg/init/struct1.C: Likewise.
+ * g++.dg/init/struct2.C: Likewise.
+ * g++.dg/init/struct3.C: Likewise.
+ * g++.dg/ext/utf-cvt.C: Correct for w64.
+ * gcc.dg/utf-cvt.c: Likewise.
+ * lib/target-supports.exp (check_effective_target_llp64): New.
+
+2008-09-30 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/37555
+ * g++.dg/parse/error32.C: New test.
+
+ PR c++/37556
+ * g++.dg/parse/error33.C: New test.
+
+2008-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/37662
+ PR tree-optimization/37663
+ * gcc.c-torture/compile/pr37662.c: New test.
+ * gcc.dg/pr37663.c: New test.
+
+2008-09-30 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/36592
+ * gfortran.dg/proc_ptr_common_1.f90: New.
+ * gfortran.dg/proc_ptr_common_2.f90: New.
+
+2008-09-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * g++.dg/warn/if-empty-1.C: Copy from gcc.dg/if-empty-1.c.
+
+2008-09-30 Paolo Bonzini <bonzini@gnu.org>
+
+ PR testsuite/36891
+ PR testsuite/37675
+ * gcc.dg/torture/pr36891.c: Add -msse on 32-bit i386.
+
+2008-09-29 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR middle-end/37669
+ * gcc.c-torture/compile/pr37669.c: New test.
+
2008-09-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR target/37640
diff --git a/gcc/testsuite/g++.dg/abi/offsetof.C b/gcc/testsuite/g++.dg/abi/offsetof.C
index 0085e57dd98..d6a53e6f80a 100644
--- a/gcc/testsuite/g++.dg/abi/offsetof.C
+++ b/gcc/testsuite/g++.dg/abi/offsetof.C
@@ -18,5 +18,5 @@ struct C: public B { };
int main ()
{
- return ((unsigned long) &((C*)0)->i) != sizeof(void*); // { dg-warning "offsetof|invalid" "" }
+ return ((__SIZE_TYPE__) &((C*)0)->i) != sizeof(void*); // { dg-warning "offsetof|invalid" "" }
}
diff --git a/gcc/testsuite/g++.dg/ext/utf-cvt.C b/gcc/testsuite/g++.dg/ext/utf-cvt.C
index 3ebc3a19af1..286a0d00715 100644
--- a/gcc/testsuite/g++.dg/ext/utf-cvt.C
+++ b/gcc/testsuite/g++.dg/ext/utf-cvt.C
@@ -46,8 +46,8 @@ void m(char16_t c0, char32_t c1)
f_i (c1); /* { dg-warning "change the sign" } */
fsi (c1); /* { dg-warning "change the sign" } */
fui (c1);
- f_l (c1); /* { dg-warning "change the sign" "" { target { ilp32 } } } */
- fsl (c1); /* { dg-warning "change the sign" "" { target { ilp32 } } } */
+ f_l (c1); /* { dg-warning "change the sign" "" { target { llp64 || ilp32 } } } */
+ fsl (c1); /* { dg-warning "change the sign" "" { target { llp64 || ilp32 } } } */
ful (c1);
f_ll (c1);
fsll (c1);
diff --git a/gcc/testsuite/g++.dg/init/struct1.C b/gcc/testsuite/g++.dg/init/struct1.C
index 4cabc99e0e2..e23faef5073 100644
--- a/gcc/testsuite/g++.dg/init/struct1.C
+++ b/gcc/testsuite/g++.dg/init/struct1.C
@@ -1,6 +1,6 @@
struct bug {
const char *name;
- unsigned long type;
+ __SIZE_TYPE__ type;
};
-struct bug s = { 0, (unsigned long) &s | 1 };
+struct bug s = { 0, (__SIZE_TYPE__) &s | 1 };
diff --git a/gcc/testsuite/g++.dg/init/struct2.C b/gcc/testsuite/g++.dg/init/struct2.C
index d7d07b5c1e3..85aacc6fa09 100644
--- a/gcc/testsuite/g++.dg/init/struct2.C
+++ b/gcc/testsuite/g++.dg/init/struct2.C
@@ -15,7 +15,7 @@ void saveOrLoad() {
};
SaveLoadEntry trackEntries = {
- ((long) (&((Track *) 42)->soundName[0])) - 42,
+ ((long) (__SIZE_TYPE__) (&((Track *) 42)->soundName[0])) - 42,
0, 1
};
saveLoadEntries(&trackEntries);
diff --git a/gcc/testsuite/g++.dg/init/struct3.C b/gcc/testsuite/g++.dg/init/struct3.C
index 6b1805c66ba..53804b3d153 100644
--- a/gcc/testsuite/g++.dg/init/struct3.C
+++ b/gcc/testsuite/g++.dg/init/struct3.C
@@ -12,4 +12,4 @@ struct SaveLoadEntry {
int size;
};
-int foobar = ((long) (& ((Track *) 42)->soundName[0])) - 42;
+int foobar = ((long) (__SIZE_TYPE__) (& ((Track *) 42)->soundName[0])) - 42;
diff --git a/gcc/testsuite/g++.dg/parse/error32.C b/gcc/testsuite/g++.dg/parse/error32.C
new file mode 100644
index 00000000000..aad961bcbe3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error32.C
@@ -0,0 +1,12 @@
+/* PR c++/37555 */
+/* { dg-do "compile" } */
+
+struct A {};
+
+typedef void (A::T)(); /* { dg-error "typedef name may not be a nested-name-specifier" } */
+
+void foo()
+{
+ T t;
+ t; /* { dg-error "was not declared" } */
+}
diff --git a/gcc/testsuite/g++.dg/parse/error33.C b/gcc/testsuite/g++.dg/parse/error33.C
new file mode 100644
index 00000000000..411dc920cc4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error33.C
@@ -0,0 +1,16 @@
+/* PR c++/37556 */
+/* { dg-do "compile" } */
+
+struct A
+{
+ void foo();
+};
+
+typedef void (A::T)(); /* { dg-error "typedef name may not be a nested" } */
+
+void bar(T); /* { dg-error "too many arguments" } */
+
+void baz()
+{
+ bar(&A::foo); /* { dg-error "at this point" } */
+}
diff --git a/gcc/testsuite/g++.dg/warn/if-empty-1.C b/gcc/testsuite/g++.dg/warn/if-empty-1.C
new file mode 100644
index 00000000000..b29a6cb9224
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/if-empty-1.C
@@ -0,0 +1,23 @@
+/* Test diagnostics for empty bodies in if / else. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wempty-body" } */
+
+void
+f (int x)
+{
+ if (x)
+ ; /* { dg-warning "suggest braces around empty body in an" } */
+ if (x)
+ ; /* By design we don't warn in this case. */
+ else
+ (void)0;
+ if (x)
+ (void)0;
+ else
+ ; /* { dg-warning "suggest braces around empty body in an" } */
+ if (x)
+ (void)0;
+ else
+ (void)0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/complex-6.c b/gcc/testsuite/gcc.c-torture/compile/complex-6.c
new file mode 100644
index 00000000000..eb89040abf3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/complex-6.c
@@ -0,0 +1,17 @@
+/* PR tree-opt/35737 */
+
+long buf[10];
+
+int foo()
+{
+ __complex__ int i = 0;
+
+ if (__builtin_setjmp(buf))
+ {
+ i = 1;
+ bar();
+ }
+
+ return i == 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37662.c b/gcc/testsuite/gcc.c-torture/compile/pr37662.c
new file mode 100644
index 00000000000..f6977438e73
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37662.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/37662 */
+
+extern int baz (void);
+
+static int
+foo (void)
+{
+ return 1;
+}
+
+int
+bar (void)
+{
+ return foo () >= 1 ^ (baz () || 0) || 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37669.c b/gcc/testsuite/gcc.c-torture/compile/pr37669.c
new file mode 100644
index 00000000000..9b003cdf099
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37669.c
@@ -0,0 +1,35 @@
+/* This testcase used to fail because a miscompiled execute_fold_all_builtins. */
+
+typedef long unsigned int size_t;
+extern __inline __attribute__ ((__always_inline__)) int __attribute__
+((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char
+*__restrict __fmt, ...) {
+ return __builtin___snprintf_chk (__s, __n, 2 - 1,
+__builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
+}
+int n1, n2, n3, n4, f5, f6;
+char * BackgroundGetUniqueString(void)
+{
+ char s[256];
+ const char *chmap =
+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
+ snprintf(s, sizeof(s),
+"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
+ chmap[(n1 >> 0) & 0x3f], chmap[(n1 >> 6) & 0x3f],
+ chmap[(n1 >> 12) & 0x3f], chmap[(n1 >> 18) & 0x3f],
+ chmap[(n1 >> 24) & 0x3f], chmap[(n1 >> 28) & 0x3f],
+ chmap[(n2 >> 0) & 0x3f], chmap[(n2 >> 6) & 0x3f],
+ chmap[(n2 >> 12) & 0x3f], chmap[(n2 >> 18) & 0x3f],
+ chmap[(n2 >> 24) & 0x3f], chmap[(n2 >> 28) & 0x3f],
+ chmap[(n3 >> 0) & 0x3f], chmap[(n3 >> 6) & 0x3f],
+ chmap[(n3 >> 12) & 0x3f], chmap[(n3 >> 18) & 0x3f],
+ chmap[(n3 >> 24) & 0x3f], chmap[(n3 >> 28) & 0x3f],
+ chmap[(n4 >> 0) & 0x3f], chmap[(n4 >> 6) & 0x3f],
+ chmap[(n4 >> 12) & 0x3f], chmap[(n4 >> 18) & 0x3f],
+ chmap[(n4 >> 24) & 0x3f], chmap[(n4 >> 28) & 0x3f],
+ chmap[(f5 >> 12) & 0x3f], chmap[(f5 >> 18) & 0x3f],
+ chmap[(f5 >> 24) & 0x3f], chmap[(f5 >> 28) & 0x3f],
+ chmap[(f6 >> 0) & 0x3f], chmap[(f6 >> 6) & 0x3f]
+ );
+ return __builtin_strdup(s);
+}
diff --git a/gcc/testsuite/gcc.dg/pr37663.c b/gcc/testsuite/gcc.dg/pr37663.c
new file mode 100644
index 00000000000..05488ebb708
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr37663.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/37663 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fwrapv" } */
+
+extern void bar (void);
+
+void
+foo (int x)
+{
+ x = 1 >= x;
+ int y = -1885403717;
+ x = x + (x != y * y);
+ if (x)
+ bar ();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr36891.c b/gcc/testsuite/gcc.dg/torture/pr36891.c
index 0d5bc98d44b..4efdfc3e1d5 100644
--- a/gcc/testsuite/gcc.dg/torture/pr36891.c
+++ b/gcc/testsuite/gcc.dg/torture/pr36891.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-ffast-math" } */
+/* { dg-options "-ffast-math -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#define __vector __attribute__((vector_size(16) ))
__vector float f(void);
diff --git a/gcc/testsuite/gcc.dg/utf-cvt.c b/gcc/testsuite/gcc.dg/utf-cvt.c
index 5c39644f917..6a69310ceeb 100644
--- a/gcc/testsuite/gcc.dg/utf-cvt.c
+++ b/gcc/testsuite/gcc.dg/utf-cvt.c
@@ -50,8 +50,8 @@ void m (char16_t c0, char32_t c1)
f_i (c1); /* { dg-warning "change the sign" } */
fsi (c1); /* { dg-warning "change the sign" } */
fui (c1);
- f_l (c1); /* { dg-warning "change the sign" "" { target { ilp32 } } } */
- fsl (c1); /* { dg-warning "change the sign" "" { target { ilp32 } } } */
+ f_l (c1); /* { dg-warning "change the sign" "" { target { llp64 || ilp32 } } } */
+ fsl (c1); /* { dg-warning "change the sign" "" { target { llp64 || ilp32 } } } */
ful (c1);
f_ll (c1);
fsll (c1);
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_common_1.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_common_1.f90
new file mode 100644
index 00000000000..0cfdec03d5a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_common_1.f90
@@ -0,0 +1,30 @@
+! { dg-do run }
+
+! PR fortran/36592
+!
+! Procedure Pointers inside COMMON blocks.
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>.
+
+subroutine one()
+ implicit none
+ common /com/ p1,p2,a,b
+ procedure(real), pointer :: p1,p2
+ integer :: a,b
+ if (a/=5 .or. b/=-9 .or. p1(0.0)/=1.0 .or. p2(0.0)/=0.0) call abort()
+end subroutine one
+
+program main
+ implicit none
+ integer :: x,y
+ intrinsic sin,cos
+ procedure(real), pointer :: func1
+ external func2
+ pointer func2
+ common /com/ func1,func2,x,y
+ x = 5
+ y = -9
+ func1 => cos
+ func2 => sin
+ call one()
+end program main
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_common_2.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_common_2.f90
new file mode 100644
index 00000000000..f401c3a15c3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_common_2.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+
+! PR fortran/36592
+!
+! Procedure Pointers inside COMMON blocks.
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>.
+
+abstract interface
+ subroutine foo() bind(C)
+ end subroutine foo
+end interface
+
+procedure(foo), pointer, bind(C) :: proc
+common /com/ proc,r
+
+common s
+call s() ! { dg-error "PROCEDURE attribute conflicts with COMMON attribute" }
+
+end
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index a5e03bf0929..3d118af7dda 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1057,6 +1057,18 @@ proc check_effective_target_lp64 { } {
}]
}
+# Return 1 if we're generating 64-bit code using default llp64 options,
+# 0 otherwise.
+
+proc check_effective_target_llp64 { } {
+ return [check_no_compiler_messages llp64 object {
+ int dummy[sizeof (int) == 4
+ && sizeof (void *) == 8
+ && sizeof (long long) == 8
+ && sizeof (long) == 4 ? 1 : -1];
+ }]
+}
+
# Return 1 if the target supports long double larger than double,
# 0 otherwise.
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index bbf4c494218..939bd6f1a63 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -537,7 +537,8 @@ set_component_ssa_name (tree ssa_name, bool imag_p, tree value)
/* If we've nothing assigned, and the value we're given is already stable,
then install that as the value for this SSA_NAME. This preemptively
copy-propagates the value, which avoids unnecessary memory allocation. */
- else if (is_gimple_min_invariant (value))
+ else if (is_gimple_min_invariant (value)
+ && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ssa_name))
{
VEC_replace (tree, complex_ssa_name_components, ssa_name_index, value);
return NULL;
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 22626a53840..383367e9fb1 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -2711,6 +2711,17 @@ fold_gimple_assign (gimple_stmt_iterator *si)
STRIP_USELESS_TYPE_CONVERSION (result);
if (valid_gimple_rhs_p (result))
return result;
+
+ /* Fold might have produced non-GIMPLE, so if we trust it blindly
+ we lose canonicalization opportunities. Do not go again
+ through fold here though, or the same non-GIMPLE will be
+ produced. */
+ if (commutative_tree_code (subcode)
+ && tree_swap_operands_p (gimple_assign_rhs1 (stmt),
+ gimple_assign_rhs2 (stmt), false))
+ return build2 (subcode, TREE_TYPE (gimple_assign_lhs (stmt)),
+ gimple_assign_rhs2 (stmt),
+ gimple_assign_rhs1 (stmt));
}
break;
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 3ce30157f71..1e7538ab8a1 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -1077,8 +1077,19 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
else
vect_ptr_type = build_pointer_type (vectype);
+ if (TREE_CODE (DR_BASE_ADDRESS (dr)) == SSA_NAME
+ && TYPE_RESTRICT (TREE_TYPE (DR_BASE_ADDRESS (dr))))
+ vect_ptr_type = build_qualified_type (vect_ptr_type, TYPE_QUAL_RESTRICT);
vect_ptr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
get_name (base_name));
+ if (TREE_CODE (DR_BASE_ADDRESS (dr)) == SSA_NAME
+ && TYPE_RESTRICT (TREE_TYPE (DR_BASE_ADDRESS (dr))))
+ {
+ get_alias_set (base_name);
+ DECL_POINTER_ALIAS_SET (vect_ptr)
+ = DECL_POINTER_ALIAS_SET (SSA_NAME_VAR (DR_BASE_ADDRESS (dr)));
+ }
+
add_referenced_var (vect_ptr);
/** (2) Add aliasing information to the new vector-pointer:
@@ -1175,7 +1186,7 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
create_iv (vect_ptr_init,
fold_convert (vect_ptr_type, step),
- NULL_TREE, loop, &incr_gsi, insert_after,
+ vect_ptr, loop, &incr_gsi, insert_after,
&indx_before_incr, &indx_after_incr);
incr = gsi_stmt (incr_gsi);
set_vinfo_for_stmt (incr, new_stmt_vec_info (incr, loop_vinfo));
@@ -1206,7 +1217,7 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
{
standard_iv_increment_position (containing_loop, &incr_gsi,
&insert_after);
- create_iv (vptr, fold_convert (vect_ptr_type, DR_STEP (dr)), NULL_TREE,
+ create_iv (vptr, fold_convert (vect_ptr_type, DR_STEP (dr)), vect_ptr,
containing_loop, &incr_gsi, insert_after, &indx_before_incr,
&indx_after_incr);
incr = gsi_stmt (incr_gsi);
@@ -5190,17 +5201,6 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
return false;
}
- /* If accesses through a pointer to vectype do not alias the original
- memory reference we have a problem. This should never be the case. */
- if (get_alias_set (vectype) != get_alias_set (scalar_dest)
- && !alias_set_subset_of (get_alias_set (vectype),
- get_alias_set (scalar_dest)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "??? vector type does not alias scalar type");
- return false;
- }
-
/* The scalar rhs type needs to be trivially convertible to the vector
component type. This should always be the case. */
if (!useless_type_conversion_p (TREE_TYPE (vectype), TREE_TYPE (op)))
@@ -5440,6 +5440,12 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
vec_oprnd = VEC_index (tree, result_chain, i);
data_ref = build_fold_indirect_ref (dataref_ptr);
+ /* If accesses through a pointer to vectype do not alias the original
+ memory reference we have a problem. This should never happen. */
+ gcc_assert (get_alias_set (data_ref) == get_alias_set (gimple_assign_lhs (stmt))
+ || alias_set_subset_of (get_alias_set (data_ref),
+ get_alias_set (gimple_assign_lhs (stmt))));
+
/* Arguments are ready. Create the new vector stmt. */
new_stmt = gimple_build_assign (data_ref, vec_oprnd);
vect_finish_stmt_generation (stmt, new_stmt, gsi);
@@ -6399,17 +6405,6 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
return false;
}
- /* If accesses through a pointer to vectype do not alias the original
- memory reference we have a problem. This should never happen. */
- if (get_alias_set (vectype) != get_alias_set (gimple_assign_rhs1 (stmt))
- && !alias_set_subset_of (get_alias_set (vectype),
- get_alias_set (gimple_assign_rhs1 (stmt))))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "??? vector type does not alias scalar type");
- return false;
- }
-
/* The vector component type needs to be trivially convertible to the
scalar lhs. This should always be the case. */
if (!useless_type_conversion_p (TREE_TYPE (scalar_dest), TREE_TYPE (vectype)))
@@ -6673,6 +6668,11 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
default:
gcc_unreachable ();
}
+ /* If accesses through a pointer to vectype do not alias the original
+ memory reference we have a problem. This should never happen. */
+ gcc_assert (get_alias_set (data_ref) == get_alias_set (gimple_assign_rhs1 (stmt))
+ || alias_set_subset_of (get_alias_set (data_ref),
+ get_alias_set (gimple_assign_rhs1 (stmt))));
vec_dest = vect_create_destination_var (scalar_dest, vectype);
new_stmt = gimple_build_assign (vec_dest, data_ref);
new_temp = make_ssa_name (vec_dest, new_stmt);
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index fbcda55fc2a..4f1c3288ce7 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -6304,9 +6304,12 @@ simplify_truth_ops_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
bool need_conversion;
op0 = gimple_assign_rhs1 (stmt);
- vr = get_value_range (op0);
if (TYPE_PRECISION (TREE_TYPE (op0)) != 1)
{
+ if (TREE_CODE (op0) != SSA_NAME)
+ return false;
+ vr = get_value_range (op0);
+
val = compare_range_with_value (GE_EXPR, vr, integer_zero_node, &sop);
if (!val || !integer_onep (val))
return false;
@@ -6329,10 +6332,15 @@ simplify_truth_ops_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
if (is_gimple_min_invariant (op1))
{
/* Exclude anything that should have been already folded. */
- gcc_assert (rhs_code == EQ_EXPR || rhs_code == NE_EXPR
- || rhs_code == TRUTH_XOR_EXPR);
- gcc_assert (integer_zerop (op1) || integer_onep (op1)
- || integer_all_onesp (op1));
+ if (rhs_code != EQ_EXPR
+ && rhs_code != NE_EXPR
+ && rhs_code != TRUTH_XOR_EXPR)
+ return false;
+
+ if (!integer_zerop (op1)
+ && !integer_onep (op1)
+ && !integer_all_onesp (op1))
+ return false;
/* Limit the number of cases we have to consider. */
if (rhs_code == EQ_EXPR)
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index b5d16bb3388..d07b70e1fc0 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-30 Andreas Tobler <a.tobler@schweiz.org>
+
+ * testsuite/lib/libjava.exp (libjava_arguments): Do not append
+ "no-install" to additional_flags for *-*-darwin.
+
2008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
Steve Ellcey <sje@cup.hp.com>
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index 523c69cacd0..332c07270c8 100644
--- a/libjava/testsuite/lib/libjava.exp
+++ b/libjava/testsuite/lib/libjava.exp
@@ -422,7 +422,8 @@ proc libjava_arguments {{mode compile}} {
# Avoid libtool wrapper scripts when possible.
# but not if libtool warnings results in FAILs
if {$mode == "link"} {
- if {! [istarget "*-*-cygwin*"] && ! [istarget "*-*-mingw*"] } {
+ if {! [istarget "*-*-cygwin*"] && ! [istarget "*-*-mingw*"]
+ && ! [istarget "*-*-darwin*"] } {
lappend args "additional_flags=-no-install"
}
if { [istarget "*-*-darwin*"] } {
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 3448d906d95..359215df6f1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,17 @@
+2008-09-30 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/30085 (again)
+ * include/debug/unordered_map (unordered_map<>, unordered_multimap<>):
+ Do not derive from _Safe_association, derive from _GLIBCXX_STD_D::
+ unordered_map / unordered_multimap; add missing member functions.
+ * include/debug/unordered_set (unordered_set<>, unordered_multiset<>):
+ Likewise for _GLIBCXX_STD_D::unordered_set / unordered_multiset.
+ * include/debug/safe_association.h: Remove.
+ * include/Makefile.am: Adjust.
+ * include/Makefile.in: Regenerate.
+ * testsuite/23_containers/unordered_multimap/init-list.cc: Remove
+ xfail.
+
2008-09-28 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/unique_ptr.h (unique_ptr<_Tp[]>::template<typename U>
@@ -8,7 +22,7 @@
* testsuite/20_util/unique_ptr/assign/assign.cc: Adjust DejaGNU
directives.
-2008-09-28 Chris Fairles <cfairles@gcc.gnu.org>
+2008-09-28 Chris Fairles <cfairles@gcc.gnu.org>
* include/std/mutex (try_lock): Implement generic try_lock.
* testsuite/30_threads/try_lock/1.cc: New.
@@ -63,13 +77,13 @@
* testsuite/23_containers/bitset/cons/dr396.cc: Add.
* testsuite/23_containers/bitset/to_string/dr396.cc: Likewise.
-2008-09-23 Chris Fairles <cfairles@gcc.gnu.org>
+2008-09-23 Chris Fairles <cfairles@gcc.gnu.org>
* testsuite/25_algorithms/min/37547.cc: Return void to avoid warnings.
* testsuite/25_algorithms/max/37547.cc: Likewise.
* testsuite/25_algorithms/minmax/37547.cc: Likewise.
-2008-09-23 Chris Fairles <cfairles@gcc.gnu.org>
+2008-09-23 Chris Fairles <cfairles@gcc.gnu.org>
* include/std/chrono: If _GLIBCXX_USE_MONOTONIC_CLOCK is defined, don't
typedef monotonic_clock to system_clock and instead declare new class.
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 7b7e2c59440..82fbe09a561 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -696,7 +696,6 @@ debug_headers = \
${debug_srcdir}/map.h \
${debug_srcdir}/multimap.h \
${debug_srcdir}/multiset.h \
- ${debug_srcdir}/safe_association.h \
${debug_srcdir}/safe_base.h \
${debug_srcdir}/safe_iterator.h \
${debug_srcdir}/safe_iterator.tcc \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 95a20b25e9a..3fb80a79ea0 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -944,7 +944,6 @@ debug_headers = \
${debug_srcdir}/map.h \
${debug_srcdir}/multimap.h \
${debug_srcdir}/multiset.h \
- ${debug_srcdir}/safe_association.h \
${debug_srcdir}/safe_base.h \
${debug_srcdir}/safe_iterator.h \
${debug_srcdir}/safe_iterator.tcc \
diff --git a/libstdc++-v3/include/debug/safe_association.h b/libstdc++-v3/include/debug/safe_association.h
deleted file mode 100644
index de8945301f6..00000000000
--- a/libstdc++-v3/include/debug/safe_association.h
+++ /dev/null
@@ -1,222 +0,0 @@
-// Safe associated container base class implementation -*- C++ -*-
-
-// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file debug/safe_association.h
- * This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_SAFE_ASSOCIATION_H
-#define _GLIBCXX_DEBUG_SAFE_ASSOCIATION_H 1
-
-#include <debug/debug.h>
-#include <debug/macros.h>
-#include <debug/functions.h>
-#include <debug/formatter.h>
-#include <debug/safe_sequence.h>
-
-namespace __gnu_debug
-{
- /**
- * @brief Base class for constructing a "safe" associated container type.
- *
- * The class template %_Safe_association simplifies the construction of
- * "safe" associated containers.
- */
- template<typename _Base>
- class _Safe_association
- : public _Base
- {
- public:
- typedef typename _Base::size_type size_type;
- typedef typename _Base::hasher hasher;
- typedef typename _Base::key_equal key_equal;
- typedef typename _Base::allocator_type allocator_type;
-
- typedef typename _Base::key_type key_type;
- typedef typename _Base::value_type value_type;
- typedef typename _Base::difference_type difference_type;
- typedef typename _Base::reference reference;
- typedef typename _Base::const_reference const_reference;
-
- typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
- _Safe_association>
- iterator;
- typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
- _Safe_association>
- const_iterator;
-
- _Safe_association() { }
-
- explicit _Safe_association(size_type __n) : _Base(__n) { }
-
- _Safe_association(size_type __n, const hasher& __hf)
- : _Base(__n, __hf) { }
-
- _Safe_association(size_type __n, const hasher& __hf,
- const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__n, __hf, __eql, __a) { }
-
- template<typename _InputIter>
- _Safe_association(_InputIter __f, _InputIter __l)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
-
- template<typename _InputIter>
- _Safe_association(_InputIter __f, _InputIter __l, size_type __n)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
-
- template<typename _InputIter>
- _Safe_association(_InputIter __f, _InputIter __l, size_type __n,
- const hasher& __hf)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf)
- { }
-
- template<typename _InputIter>
- _Safe_association(_InputIter __f, _InputIter __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__gnu_debug::__check_valid_range(__f, __l),
- __l, __n, __hf, __eql, __a)
- { }
-
- _Safe_association(std::initializer_list<value_type> __l,
- size_type __n,
- const hasher& __hf,
- const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__l, __n, __hf, __eql, __a)
- { }
-
- _Safe_association(const _Base& __x) : _Base(__x) { }
-
- _Safe_association(_Safe_association&& __x)
- : _Base(std::forward<_Base>(__x)) { }
-
- using _Base::size;
- using _Base::max_size;
- using _Base::empty;
- using _Base::get_allocator;
- using _Base::key_eq;
-
- using _Base::count;
- using _Base::bucket_count;
- using _Base::max_bucket_count;
- using _Base::bucket;
- using _Base::bucket_size;
- using _Base::load_factor;
-
- const_iterator
- begin() const { return const_iterator(_Base::begin(), this); }
-
- const_iterator
- end() const { return const_iterator(_Base::end(), this); }
-
- std::pair<iterator, bool>
- insert(const value_type& __obj)
- {
- typedef std::pair<typename _Base::iterator, bool> __pair_type;
- __pair_type __res = _Base::insert(__obj);
- return std::make_pair(iterator(__res.first, this), __res.second);
- }
-
- void
- insert(const value_type* __first, const value_type* __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first, __last);
- }
-
- template<typename _InputIter>
- void
- insert(_InputIter __first, _InputIter __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first.base(), __last.base());
- }
-
- void
- insert(std::initializer_list<value_type> __l)
- { _Base::insert(__l); }
-
- const_iterator
- find(const key_type& __key) const
- { return const_iterator(_Base::find(__key), this); }
-
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type& __key) const
- {
- typedef typename _Base::const_iterator _Base_iterator;
- typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
- __pair_type __res = _Base::equal_range(__key);
- return std::make_pair(const_iterator(__res.first, this),
- const_iterator(__res.second, this));
- }
-
- size_type
- erase(const key_type& __key)
- {
- size_type __ret(0);
- iterator __victim(_Base::find(__key), this);
- if (__victim != end())
- {
- this->erase(__victim);
- __ret = 1;
- }
- return __ret;
- }
-
- iterator
- erase(iterator __it)
- {
- __glibcxx_check_erase(__it);
- __it._M_invalidate();
- return iterator(_Base::erase(__it.base()));
- }
-
- iterator
- erase(iterator __first, iterator __last)
- {
- __glibcxx_check_erase_range(__first, __last);
- for (iterator __tmp = __first; __tmp != __last;)
- {
- iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- return iterator(_Base::erase(__first.base(), __last.base()));
- }
-
- _Base&
- _M_base() { return *this; }
-
- const _Base&
- _M_base() const { return *this; }
- };
-} // namespace __gnu_debug
-
-#endif
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index 79590f56755..dcd76ad9894 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -1,6 +1,6 @@
// Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -40,43 +40,48 @@
#else
# include <c++0x_warning.h>
#endif
-#include <initializer_list>
-#include <debug/safe_association.h>
-#include <debug/safe_iterator.h>
-#define _GLIBCXX_BASE unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
-#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <initializer_list>
namespace std
{
namespace __debug
{
template<typename _Key, typename _Tp,
- typename _Hash = std::hash<_Key>,
+ typename _Hash = std::hash<_Key>,
typename _Pred = std::equal_to<_Key>,
- typename _Alloc = std::allocator<_Key> >
+ typename _Alloc = std::allocator<_Key> >
class unordered_map
- : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
- public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ : public _GLIBCXX_STD_D::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_map<_Key, _Tp, _Hash,
+ _Pred, _Alloc> >
{
- typedef typename _GLIBCXX_STD_BASE _Base;
- typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef _GLIBCXX_STD_D::unordered_map<_Key, _Tp, _Hash,
+ _Pred, _Alloc> _Base;
typedef __gnu_debug::_Safe_sequence<unordered_map> _Safe_base;
public:
- typedef typename _Safe_assoc::size_type size_type;
- typedef typename _Safe_assoc::value_type value_type;
- typedef typename _Safe_assoc::hasher hasher;
- typedef typename _Safe_assoc::key_equal key_equal;
- typedef typename _Safe_assoc::allocator_type allocator_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_map> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_map> const_iterator;
explicit
unordered_map(size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__n, __hf, __eql, __a)
- { }
+ : _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_map(_InputIterator __f, _InputIterator __l,
@@ -84,21 +89,32 @@ namespace __debug
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
- { }
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
- unordered_map(const _Safe_assoc& __x)
- : _Safe_assoc(__x), _Safe_base() { }
+ unordered_map(const unordered_map& __x)
+ : _Base(__x), _Safe_base() { }
- unordered_map(unordered_map&& __x)
- : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+ unordered_map(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_map(unordered_map&& __x)
+ : _Base(std::forward<unordered_map>(__x)), _Safe_base() { }
unordered_map(initializer_list<value_type> __l,
size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__l, __n, __hf, __eql, __a) { }
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
+
+ unordered_map&
+ operator=(const unordered_map& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
unordered_map&
operator=(unordered_map&& __x)
@@ -120,7 +136,7 @@ namespace __debug
void
swap(unordered_map&& __x)
{
- _Safe_assoc::swap(__x);
+ _Base::swap(__x);
_Safe_base::_M_swap(__x);
}
@@ -131,13 +147,168 @@ namespace __debug
this->_M_invalidate_all();
}
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return iterator(__res.first, this);
+ }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return const_iterator(__res.first, this);
+ }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
private:
void
_M_invalidate_all()
{
typedef typename _Base::const_iterator _Base_const_iterator;
typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
}
};
@@ -162,59 +333,74 @@ namespace __debug
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
{ __x.swap(__y); }
-#undef _GLIBCXX_BASE
-#undef _GLIBCXX_STD_BASE
-#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
-#define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
template<typename _Key, typename _Tp,
- typename _Hash = std::hash<_Key>,
+ typename _Hash = std::hash<_Key>,
typename _Pred = std::equal_to<_Key>,
- typename _Alloc = std::allocator<_Key> >
+ typename _Alloc = std::allocator<_Key> >
class unordered_multimap
- : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
- public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ : public _GLIBCXX_STD_D::unordered_multimap<_Key, _Tp, _Hash,
+ _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_multimap<_Key, _Tp, _Hash,
+ _Pred, _Alloc> >
{
- typedef typename _GLIBCXX_STD_BASE _Base;
- typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef _GLIBCXX_STD_D::unordered_multimap<_Key, _Tp, _Hash,
+ _Pred, _Alloc> _Base;
typedef __gnu_debug::_Safe_sequence<unordered_multimap> _Safe_base;
public:
- typedef typename _Safe_assoc::size_type size_type;
- typedef typename _Safe_assoc::value_type value_type;
- typedef typename _Safe_assoc::hasher hasher;
- typedef typename _Safe_assoc::key_equal key_equal;
- typedef typename _Safe_assoc::allocator_type allocator_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_multimap> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_multimap> const_iterator;
explicit
unordered_multimap(size_type __n = 10,
- const hasher& __hf = hasher(),
- const key_equal& __eql = key_equal(),
- const allocator_type& __a = allocator_type())
- : _Safe_assoc(__n, __hf, __eql, __a)
- { }
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_multimap(_InputIterator __f, _InputIterator __l,
- size_type __n = 10,
- const hasher& __hf = hasher(),
- const key_equal& __eql = key_equal(),
- const allocator_type& __a = allocator_type())
- : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
- { }
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
+
+ unordered_multimap(const unordered_multimap& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multimap(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multimap(unordered_multimap&& __x)
+ : _Base(std::forward<unordered_multimap>(__x)), _Safe_base() { }
unordered_multimap(initializer_list<value_type> __l,
size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__l, __n, __hf, __eql, __a) { }
-
- unordered_multimap(const _Safe_assoc& __x)
- : _Safe_assoc(__x), _Safe_base() { }
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
- unordered_multimap(unordered_multimap&& __x)
- : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+ unordered_multimap&
+ operator=(const unordered_multimap& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
unordered_multimap&
operator=(unordered_multimap&& __x)
@@ -236,7 +422,7 @@ namespace __debug
void
swap(unordered_multimap&& __x)
{
- _Safe_assoc::swap(__x);
+ _Base::swap(__x);
_Safe_base::_M_swap(__x);
}
@@ -247,13 +433,156 @@ namespace __debug
this->_M_invalidate_all();
}
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ iterator
+ insert(const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ { return const_iterator(_Base::insert(__obj), this); }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
private:
void
_M_invalidate_all()
{
typedef typename _Base::const_iterator _Base_const_iterator;
typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
}
};
@@ -281,7 +610,4 @@ namespace __debug
} // namespace __debug
} // namespace std
-#undef _GLIBCXX_BASE
-#undef _GLIBCXX_STD_BASE
-
#endif
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set
index 4c5d4d5ce34..7414cfc6b97 100644
--- a/libstdc++-v3/include/debug/unordered_set
+++ b/libstdc++-v3/include/debug/unordered_set
@@ -1,6 +1,6 @@
// Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -41,43 +41,47 @@
# include <c++0x_warning.h>
#endif
-#include <initializer_list>
-#include <debug/safe_association.h>
+#include <debug/safe_sequence.h>
#include <debug/safe_iterator.h>
-
-#define _GLIBCXX_BASE unordered_set<_Value, _Hash, _Pred, _Alloc>
-#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+#include <initializer_list>
namespace std
{
namespace __debug
{
template<typename _Value,
- typename _Hash = std::hash<_Value>,
+ typename _Hash = std::hash<_Value>,
typename _Pred = std::equal_to<_Value>,
- typename _Alloc = std::allocator<_Value> >
+ typename _Alloc = std::allocator<_Value> >
class unordered_set
- : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
- public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ : public _GLIBCXX_STD_D::unordered_set<_Value, _Hash, _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_set<_Value, _Hash,
+ _Pred, _Alloc> >
{
- typedef typename _GLIBCXX_STD_BASE _Base;
- typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef _GLIBCXX_STD_D::unordered_set<_Value, _Hash,
+ _Pred, _Alloc> _Base;
typedef __gnu_debug::_Safe_sequence<unordered_set> _Safe_base;
public:
- typedef typename _Safe_assoc::size_type size_type;
- typedef typename _Safe_assoc::value_type value_type;
- typedef typename _Safe_assoc::hasher hasher;
- typedef typename _Safe_assoc::key_equal key_equal;
- typedef typename _Safe_assoc::allocator_type allocator_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_set> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_set> const_iterator;
explicit
unordered_set(size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__n, __hf, __eql, __a)
- { }
+ : _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_set(_InputIterator __f, _InputIterator __l,
@@ -85,21 +89,32 @@ namespace __debug
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
- { }
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
+
+ unordered_set(const unordered_set& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_set(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_set(unordered_set&& __x)
+ : _Base(std::forward<unordered_set>(__x)), _Safe_base() { }
unordered_set(initializer_list<value_type> __l,
size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__l, __n, __hf, __eql, __a) { }
-
- unordered_set(const _Safe_assoc& __x)
- : _Safe_assoc(__x), _Safe_base() { }
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
- unordered_set(unordered_set&& __x)
- : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+ unordered_set&
+ operator=(const unordered_set& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
unordered_set&
operator=(unordered_set&& __x)
@@ -121,7 +136,7 @@ namespace __debug
void
swap(unordered_set&& __x)
{
- _Safe_assoc::swap(__x);
+ _Base::swap(__x);
_Safe_base::_M_swap(__x);
}
@@ -132,13 +147,168 @@ namespace __debug
this->_M_invalidate_all();
}
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return iterator(__res.first, this);
+ }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return const_iterator(__res.first, this);
+ }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
private:
void
_M_invalidate_all()
{
typedef typename _Base::const_iterator _Base_const_iterator;
typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
}
};
@@ -160,59 +330,73 @@ namespace __debug
unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
{ __x.swap(__y); }
-#undef _GLIBCXX_BASE
-#undef _GLIBCXX_STD_BASE
-#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
-#define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc>
template<typename _Value,
- typename _Hash = std::hash<_Value>,
+ typename _Hash = std::hash<_Value>,
typename _Pred = std::equal_to<_Value>,
- typename _Alloc = std::allocator<_Value> >
+ typename _Alloc = std::allocator<_Value> >
class unordered_multiset
- : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
- public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ : public _GLIBCXX_STD_D::unordered_multiset<_Value, _Hash, _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_multiset<_Value, _Hash,
+ _Pred, _Alloc> >
{
- typedef typename _GLIBCXX_STD_BASE _Base;
- typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef _GLIBCXX_STD_D::unordered_multiset<_Value, _Hash,
+ _Pred, _Alloc> _Base;
typedef __gnu_debug::_Safe_sequence<unordered_multiset> _Safe_base;
public:
- typedef typename _Safe_assoc::size_type size_type;
- typedef typename _Safe_assoc::value_type value_type;
- typedef typename _Safe_assoc::hasher hasher;
- typedef typename _Safe_assoc::key_equal key_equal;
- typedef typename _Safe_assoc::allocator_type allocator_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_multiset> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_multiset> const_iterator;
explicit
unordered_multiset(size_type __n = 10,
- const hasher& __hf = hasher(),
- const key_equal& __eql = key_equal(),
- const allocator_type& __a = allocator_type())
- : _Safe_assoc(__n, __hf, __eql, __a)
- { }
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_multiset(_InputIterator __f, _InputIterator __l,
- size_type __n = 10,
- const hasher& __hf = hasher(),
- const key_equal& __eql = key_equal(),
- const allocator_type& __a = allocator_type())
- : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
- { }
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
+
+ unordered_multiset(const unordered_multiset& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multiset(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multiset(unordered_multiset&& __x)
+ : _Base(std::forward<unordered_multiset>(__x)), _Safe_base() { }
unordered_multiset(initializer_list<value_type> __l,
size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
- : _Safe_assoc(__l, __n, __hf, __eql, __a) { }
-
- unordered_multiset(const _Safe_assoc& __x)
- : _Safe_assoc(__x), _Safe_base() { }
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
- unordered_multiset(unordered_multiset&& __x)
- : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+ unordered_multiset&
+ operator=(const unordered_multiset& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
unordered_multiset&
operator=(unordered_multiset&& __x)
@@ -234,24 +418,167 @@ namespace __debug
void
swap(unordered_multiset&& __x)
{
- _Safe_assoc::swap(__x);
+ _Base::swap(__x);
_Safe_base::_M_swap(__x);
}
- void
+ void
clear()
{
_Base::clear();
this->_M_invalidate_all();
}
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ iterator
+ insert(const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ { return const_iterator(_Base::insert(__obj), this); }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
private:
void
_M_invalidate_all()
{
typedef typename _Base::const_iterator _Base_const_iterator;
typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
}
};
@@ -276,7 +603,4 @@ namespace __debug
} // namespace __debug
} // namespace std
-#undef _GLIBCXX_BASE
-#undef _GLIBCXX_STD_BASE
-
#endif
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/init-list.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/init-list.cc
index ba35b38d85b..5faba7f57f9 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/init-list.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/init-list.cc
@@ -26,8 +26,6 @@
// the GNU General Public License.
// { dg-options "-std=gnu++0x" }
-// XFAIL this test until debug mode container is fixed.
-// { dg-excess-errors "" }
#include <set>
#include <unordered_map>