Uros Bizjak [Mon, 31 Dec 2012 12:09:52 +0000 (13:09 +0100)]
builtin_target.c (vendor_signatures): Remove.
* gcc.target/i386/builtin_target.c (vendor_signatures): Remove.
(check_detailed): Use signature_INTEL_ebx and signature_AMD_ebx
to check vendor signature.
Kai Tietz [Fri, 28 Dec 2012 21:49:59 +0000 (22:49 +0100)]
rtti.c (LONGPTR_T): New helper-macro.
* rtti.c (LONGPTR_T): New helper-macro.
(get_pseudo_ti_init): Initialize offset_type by LONGPTR_T
type instead of 'long' type.
(create_tinfo_types): Use for offset/flags field LONGPTR_T
type instead of 'long' type.
Jerry DeLisle [Thu, 27 Dec 2012 18:07:33 +0000 (18:07 +0000)]
re PR fortran/48976 (INQUIRE with STREAM= not supported)
2012-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/48976
* io/inquire.c (inquire_via_unit): Set user stream inquiry variable to
appropriate value based on unit access method. (inquire_via_filename):
Since filename is not associated with an open unit, set stream inquiry
to UNKNOWN.
* io/io.h: Define inquire stream parameters.
David Edelsohn [Thu, 27 Dec 2012 17:53:17 +0000 (17:53 +0000)]
rs6000.c (rs6000_deligitimze_address): Do not delegitimize TLS addresses on AIX.
* config/rs6000/rs6000.c (rs6000_deligitimze_address): Do not
delegitimize TLS addresses on AIX.
(rs6000_legitimize_tls_address_aix): Append TLS symbol qualifier.
Set SYMBOL_FLAG_LOCAL on module symbol.
(output_toc): Do not append TLS symbol qualifier here.
* config/rs6000/rs6000.md (tls_get_addr_internal): Add GPR 4 to
clobbers.
Sriraman Tallam [Thu, 27 Dec 2012 01:58:06 +0000 (01:58 +0000)]
Before this patch...
Before this patch, function multiversioning determines that two functions
are different by comparing the arch type and isa flags that are set
after the target string is processed. This leads to cases where the
versions become identical when the command-line target options are
altered.
This patch modifies the function version determination to
just compare the target string.
2012-12-27 Sriraman Tallam <tmsriram@google.com>
* doc/tm.texi.in (TARGET_OPTION_SUPPORTS_FUNCTION_VERSIONS): Document
new target hook.
* doc/tm.texi: Regenerate.
* c-family/c-common.c (handle_target_attribute): Retain target attribute
for targets that support versioning.
* target.def (supports_function_versions): New hook.
* cp/class.c (add_method): Remove calls
to DECL_FUNCTION_SPECIFIC_TARGET.
* config/i386/i386.c (ix86_function_versions): Use target string
to check for function versions instead of target flags.
* (ix86_supports_function_versions): New function.
* (is_function_default_version): Check target string.
* TARGET_OPTION_SUPPORTS_FUNCTION_VERSIONS: New macro.
Jan Hubicka [Sat, 22 Dec 2012 23:27:49 +0000 (00:27 +0100)]
re PR lto/54728 (ICE in input_gimple_stmt, at gimple-streamer-in.c:254)
PR lto/54728
* cgraph.h (symtab_real_symbol_p): Drop code looking for external functions.
* lto-streamer-out.c (output_symbol_p): New function.
(produce_symtab) Use it.
Ed Schonberg [Fri, 21 Dec 2012 22:31:42 +0000 (22:31 +0000)]
re PR ada/53737 (Assert_Failure on a generic package with a package as parameter)
PR ada/53737
* sem_ch12.adb (Analyze_Associations): Do not check the legality of
actuals for RACW types if this is an internal instantiation for a formal
package with defaulted parameters.
Vladimir Makarov [Fri, 21 Dec 2012 21:20:48 +0000 (21:20 +0000)]
re PR inline-asm/55775 (ICE when building pari)
2012-12-21 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/55775
* lra-assigns.c (improve_inheritance): Do nothing after
LRA_MAX_INHERITANCE_PASSES pass.
* lra-constraints.c (MAX_CONSTRAINT_ITERATION_NUMBER): Rename to
LRA_MAX_CONSTRAINT_ITERATION_NUMBER. Move to lra-int.h.
(MAX_INHERITANCE_PASSES): Rename to LRA_MAX_INHERITANCE_PASSES.
Move to lra-int.h.
* lra-int.h (LRA_MAX_CONSTRAINT_ITERATION_NUMBER): Move from
lra-constraints.c.
(LRA_MAX_INHERITANCE_PASSES): Ditto.
2012-12-21 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/55775
* gcc.target/i386/pr55775.c: New test.
David Edelsohn [Fri, 21 Dec 2012 16:21:53 +0000 (16:21 +0000)]
target-supports.exp (add_options_for_tls): Add -pthread for AIX as well.
* lib/target-supports.exp (add_options_for_tls): Add -pthread for
AIX as well.
(check_effective_target_powerpc_vsx_ok): Only test VSX on AIX 7.1
and above.
Richard Biener [Fri, 21 Dec 2012 14:33:59 +0000 (14:33 +0000)]
re PR middle-end/52996 (ice in verify_loop_structure, at cfgloop.c:1567)
2012-12-21 Richard Biener <rguenther@suse.de>
PR rtl-optimization/52996
* cprop.c (bypass_block): When loops are to be preserved
do not bypass loop headers. Revert earlier kludge to remove
loops when doing that.
Paul Thomas [Fri, 21 Dec 2012 14:29:34 +0000 (14:29 +0000)]
re PR fortran/55763 (Issues with some simpler CLASS(*) programs)
2012-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55763
* match.c (select_type_set_tmp): Return is a derived type or
class typespec has no derived type.
* resolve.c (resolve_fl_var_and_proc): Exclude select type
temporaries from 'pointer'.
(resolve_symbol): Exclude select type temporaries from tests
for assumed size and assumed rank.
2012-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55763
* gfortran.dg/unlimited_polymorphic_4.f03: New test.
Kai Tietz [Fri, 21 Dec 2012 10:12:48 +0000 (11:12 +0100)]
os_defines.h (_GLIBCXX_LLP64): Define if llp64 abi is used.
* config/os/mingw32/os_defines.h (_GLIBCXX_LLP64): Define if llp64
abi is used.
* config/os/mingw32-w64/os_defines.h: Likewise.
* libsupc++/cxxabi.h (__base_class_type_info): Adjust
type of __offset_flags for llp64.
* libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define proper
for llp64 abi.
(EMERGENCY_OBJ_COUNT): Likewise.
(bitmask_type): Likewise.
* libsupc++/hash_bytes.cc (_Hash_bytes): Handle llp64.
Matthias Klose [Thu, 20 Dec 2012 19:17:53 +0000 (19:17 +0000)]
Makefile.def (install-target-libgfortran): Depend on install-target-libquadmath, install-target-libgcc.
2012-12-20 Matthias Klose <doko@ubuntu.com>
* Makefile.def (install-target-libgfortran): Depend on
install-target-libquadmath, install-target-libgcc.
(install-target-libsanitizer): Depend on install-target-libgcc.
(install-target-libjava): Depend on install-target-libgcc.
(install-target-libitm): Depend on install-target-libgcc.
(install-target-libobjc): Depend on install-target-libgcc.
(install-target-libstdc++-v3): Depend on install-target-libgcc.
* Makefile.in: Regenerate.
* config/s390/s390.md (IXOR): New code iterator.
(*r<IXOR>sbg_<GPR>_noshift): Rename from *insv<GPR>_or_z10_noshift;
macro-ize to handle XOR too.
(*r<IXOR>sbg_di_rotl, *r<IXOR>sbg_<GPR>_srl, *r<IXOR>sbg_<GPR>_sll):
New patterns.
Co-Authored-By: Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
From-SVN: r194645
Teresa Johnson [Thu, 20 Dec 2012 14:31:09 +0000 (14:31 +0000)]
Fix PR gcov-profile/55734 by using methods from hwint.c instead of builtins...
Fix PR gcov-profile/55734 by using methods from hwint.c instead of
builtins, to handle non-GCC and older versions of GCC. When building
libgcov.a, however, hwint.c is not available, but we are always using
the bootstrapped compiler and can therefore use the builtins.
Use __builtin_popcount instead of __builtin_popcountll, since we
are operating on an int.
Use floor_log2 directly, instead of clz_hwi for the non-libgcov case,
and handle situations where the size of the gcov_type is bigger than
HOST_WIDE_INT. Verified that the various cases compiled by forcing
different HOST_BITS_PER_WIDE_INT values.
2012-12-20 Teresa Johnson <tejohnson@google.com>
Jakub Jelinek <jakub@redhat.com>
PR gcov-profile/55734
* gcov-io.c (gcov_read_summary): Use __builtin_popcount instead
of __builtin_popcountll when building libgcov.a, otherwise use
popcount_hwi.
(gcov_histo_index): When not building libgcov.a, use floor_log2
instead of __builtin_clzll.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r194634
Jakub Jelinek [Thu, 20 Dec 2012 10:41:47 +0000 (11:41 +0100)]
re PR c++/55619 (Chromium build fails with: error: memory input is not directly addressable)
PR c++/55619
* c-parser.c (c_parser_asm_operands): Remove CONVERT_P
argument, don't call default_function_array_conversion
nor c_fully_fold here.
(c_parser_asm_statement): Adjust callers.
* c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
and outputs here, and call default_function_array_conversion
on inputs that don't need to be addressable.
Jakub Jelinek [Thu, 20 Dec 2012 10:40:26 +0000 (11:40 +0100)]
re PR c/39464 (Attribute may_alias causes invalid warning)
PR c/39464
* c-typeck.c (convert_for_assignment): For -Wpointer-sign
warning require that both c_common_unsigned_type as well as
c_common_signed_type is the same for both mvl and mvr types.
Paul Thomas [Thu, 20 Dec 2012 00:15:00 +0000 (00:15 +0000)]
array.c (resolve_array_list): Apply C4106.
2012-12-19 Paul Thomas <pault@gcc.gnu.org>
* array.c (resolve_array_list): Apply C4106.
* check.c (gfc_check_same_type_as): Exclude polymorphic
entities from check for extensible types. Improved error
for disallowed argument types to name the offending type.
* class.c : Update copyright date.
(gfc_class_null_initializer): Add argument for initialization
expression and deal with unlimited polymorphic typespecs.
(get_unique_type_string): Give unlimited polymorphic
entities a type string.
(gfc_intrinsic_hash_value): New function.
(gfc_build_class_symbol): Incorporate unlimited polymorphic
entities.
(gfc_find_derived_vtab): Deal with unlimited polymorphic
entities.
(gfc_find_intrinsic_vtab): New function.
* decl.c (gfc_match_decl_type_spec): Match typespec for
unlimited polymorphic type.
(gfc_match_data_decl): Skip to 'ok' if unlimited polymorphic.
expr.c (gfc_check_pointer_assign): Apply C717. If unlimited
polymorphic lvalue, find rvalue vtable for all typespecs,
except unlimited polymorphic expressions.
(gfc_check_vardef_context): Handle unlimited polymorphic
entities.
* gfortran.h : Add unlimited polymorphic attribute. Add
second arg to gfc_class_null_initializer primitive and
primitive for gfc_find_intrinsic_vtab. Add UNLIMITED_POLY
to detect unlimited polymorphic expressions.
* interface.c (gfc_compare_types): If expr1 is unlimited
polymorphic, always return 1. If expr2 is unlimited polymorphic
enforce C717.
(gfc_compare_interfaces): Skip past conditions that do not
apply for unlimited polymorphic entities.
(compare_parameter): Make sure that an unlimited polymorphic,
allocatable or pointer, formal argument is matched by an
unlimited polymorphic actual argument.
(compare_actual_formal): Ensure that an intrinsic vtable exists
to match an unlimited polymorphic formal argument.
* match.c (gfc_match_allocate): Type kind parameter does not
need to match an unlimited polymorphic allocate-object.
(alloc_opt_list): An unlimited polymorphic allocate-object
requires a typespec or a SOURCE tag.
(select_intrinsic_set_tmp): New function.
(select_type_set_tmp): Call new function. If it returns NULL,
build a derived type or class temporary instead.
(gfc_match_type_is): Remove restriction to derived types only.
Bind(C) or sequence derived types not permitted.
* misc (gfc_typename): Printed CLASS(*) for unlimited
polymorphism.
* module.c : Add AB_UNLIMITED_POLY to pass unlimited
polymorphic attribute to and from modules.
* resolve.c (resolve_common_vars): Unlimited polymorphic
entities cannot appear in common blocks.
(resolve_deallocate_expr): Deallocate unlimited polymorphic
enities.
(resolve_allocate_expr): Likewise for allocation. Make sure
vtable exists.
(gfc_type_is_extensible): Unlimited polymorphic entities are
not extensible.
(resolve_select_type): Handle unlimited polymorphic selectors.
Ensure that length type parameters are assumed and that names
for intrinsic types are generated.
(resolve_fl_var_and_proc): Exclude select type temporaries
from test of extensibility of type.
(resolve_fl_variable): Likewise for test that assumed character
length must be a dummy or a parameter.
(resolve_fl_derived0): Return SUCCESS unconditionally for
unlimited polymorphic entities. Also, allow unlimited
polymorphic components.
(resolve_fl_derived): Return SUCCESS unconditionally for
unlimited polymorphic entities.
(resolve_symbol): Return early with unlimited polymorphic
entities.
* simplifiy.c : Update copyright year.
(gfc_simplify_extends_type_of): No simplification possible
for unlimited polymorphic arguments.
* symbol.c (gfc_use_derived): Nothing to do for unlimited
polymorphic "derived type".
(gfc_type_compatible): Return unity if ts1 is unlimited
polymorphic.
* trans-decl.c (create_function_arglist) Formal arguments
without a character length should be treated in the same way
as passed lengths.
(gfc_trans_deferred_vars): Nullify the vptr of unlimited
polymorphic pointers. Avoid unlimited polymorphic entities
triggering gcc_unreachable.
* trans-expr.c (gfc_conv_intrinsic_to_class): New function.
(gfc_trans_class_init_assign): Make indirect reference of
src.expr.
(gfc_trans_class_assign): Expression NULL of unknown type
should set NULL vptr on lhs. Treat C717 cases where lhs is
a derived type and the rhs is unlimited polymorphic.
(gfc_conv_procedure_call): Handle the conversion of a non-class
actual argument to match an unlimited polymorphic formal
argument. Suppress the passing of a character string length
in this case. Make sure that calls to the character __copy
function have two character string length arguments.
(gfc_conv_initializer): Pass the initialization expression to
gfc_class_null_initializer.
(gfc_trans_subcomponent_assign): Ditto.
(gfc_conv_structure): Move handling of _size component.
trans-intrinsic.c: (gfc_conv_same_type_as): Handle conditions
where unlimited polymorphic arguments have null vptr.
* trans-stmt.c (trans_associate_var): Correctly treat array
temporaries associated with unlimited polymorphic selectors.
Recover the overwritten dtype for the descriptor. Use the _size
field of the vptr for character string lengths.
(gfc_trans_allocate): Cope with unlimited polymorphic allocate
objects; especially with character source tags.
(reset_vptr): New function.
(gfc_trans_deallocate): Call it.
* trans-types.c (gfc_get_derived_type): Detect unlimited
polymorphic types and deal with cases where the derived type of
components is null.
* trans.c : Update copyright year.
(trans_code): Call gfc_trans_class_assign for C717 cases where
the lhs is not unlimited polymorphic.
2012-12-19 Paul Thomas <pault@gcc.gnu.org>
* intrinsics/extends_type_of.c : Return correct results for
null vptrs.
2012-12-19 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/unlimited_polymorphic_1.f03: New test.
* gfortran.dg/unlimited_polymorphic_2.f03: New test.
* gfortran.dg/unlimited_polymorphic_3.f03: New test.
* gfortran.dg/same_type_as.f03: Correct for improved message.