* simple-object-elf.c (simple_object_elf_write_ehdr): Correctly
handle objects with more than SHN_LORESERVE sections.
(simple_object_elf_write_shdr): Add sh_link parameter.
(simple_object_elf_write_to_file): Correctly handle objects with
more than SHN_LORESERVE sections.
From-SVN: r215394
-Wsuggest-final-types crashes when used on mininal testcases.
Fix by bailing out early when odr_types_ptr is NULL in ipa_devirt()
2014-09-19 Markus Trippelsdorf <markus@trippelsdorf.de>
PR ipa/61998
* ipa-devirt.c (ipa_devirt): Bail out if odr_types_ptr is NULL.
2014-09-19 Markus Trippelsdorf <markus@trippelsdorf.de>
PR ipa/61998
* g++.dg/warn/Wsuggest-final-2.C: New testcase.
From-SVN: r215392
gcc/
* doc/md.texi (Modifiers): Consistently use "read/write"
nomenclature rather than "input/output".
* genrecog.c (constraints_supported_in_insn_p): New.
(validate_pattern): If needed, also check constraints on
MATCH_SCRATCH operands.
* genoutput.c (validate_insn_alternatives): Catch earlyclobber
operands with no '=' or '+' modifier.
From-SVN: r215388
2014-09-19 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.md ("trunctdsd2", "extendsdtd2"): New
expanders.
2014-09-19 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.target/s390/dfp-conv1.c: New testcase.
From-SVN: r215382
2014-09-19 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
PR target/62662
* config/s390/s390.c (s390_emit_epilogue): When doing the return
address load optimization force s390_optimize_prologue to leave it
that way. Only do the optimization if we already decided to push
r14 into a stack slot.
From-SVN: r215381
This patch removes the (undocumented) LIBGCC2_TF_CEXT target macro,
replacing it by -fbuilding-libgcc predefines (and thereby gets rid of
another LIBGCC2_LONG_DOUBLE_TYPE_SIZE conditional, though some more
patches are needed before that target macro can be eliminated). This
macro indicated the suffix used on __builtin_huge_val,
__builtin_copysign, __builtin_fabs built-in function names to produce
the names for a given floating-point mode.
Predefines are added for all floating-point modes supported for
libgcc, not just TFmode. These are fully accurate for modes
corresponding to float, double and long double. For other modes, the
suffix for *constants* is determined by the targetm.c.mode_for_suffix
hook (the limit to two possible suffixes 'w' and 'q' being hardcoded
in various places). This is in fact the suffix for built-in functions
as well where such functions exist.
* For i386, the *q functions always exist (whether or not TFmode is
used for long double). The *w functions never exist (but this
doesn't matter for libgcc, since no i386 configuration treats XFmode
as a supported scalar mode if long double is TFmode; if __float80
were to be supported for 64-bit Android, properly such functions
ought to be added).
* For ia64, the *q functions exist for non-HP-UX (under HP-UX, long
double is TFmode, so they aren't needed). The *w functions never
exist. This is an issue for this libgcc code for the XFmode complex
functions in libgcc on HP-UX; as I understand it, right now those
will accidentally be using TFmode versions of those three functions,
so involving unnecessary conversions, while the sanity check on CEXT
accidentally passes because all it tests is the sizes of the types.
Because of the lack of 'w' functions, the patch uses 'l' when the
constant suffix is 'w', matching what the existing libgcc code would
do for IA64 HP-UX in that case.
Ideally there would be generic code to create such built-in functions
for all supported floating-point types. That may be something to
consider if support for TS 18661-3 (standard bindings for IEEE
754-2008, defining names such as _Float128, and function names such as
copysignf128) is added in future.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu.
gcc:
* system.h (LIBGCC2_TF_CEXT): Poison.
* config/i386/cygming.h (LIBGCC2_TF_CEXT): Remove.
* config/i386/darwin.h (LIBGCC2_TF_CEXT): Likewise.
* config/i386/dragonfly.h (LIBGCC2_TF_CEXT): Likewise.
* config/i386/freebsd.h (LIBGCC2_TF_CEXT): Likewise.
* config/i386/gnu-user-common.h (LIBGCC2_TF_CEXT): Likewise.
* config/i386/openbsdelf.h (LIBGCC2_TF_CEXT): Likewise.
* config/i386/sol2.h (LIBGCC2_TF_CEXT): Likewise.
* config/ia64/ia64.h (LIBGCC2_TF_CEXT): Likewise.
* config/ia64/linux.h (LIBGCC2_TF_CEXT): Likewise.
gcc/c-family:
* c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
for supported floating-point modes.
libgcc:
* libgcc2.c (CEXT): Define using __LIBGCC_*_FUNC_EXT__.
From-SVN: r215368
2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR debug/63285
* haifa-sched.c (schedule_block): Advance cycle at the end of BB
if advance != 0.
2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR debug/63285
* gcc.target/i386/pr63285.c: New test.
From-SVN: r215364
PR c++/63248
* semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
on type of type dependent expressions, and don't call it if
handle_omp_array_sections has kept TREE_LIST because something
was type dependent.
* pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
Use keep_next_level, begin_omp_structured_block and
finish_omp_structured_block instead of push_stmt_list and
pop_stmt_list.
libgomp/
* testsuite/libgomp.c++/pr63248.C: New test.
From-SVN: r215359
/cp
2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62232
* class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
for final class types.
/testsuite
2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62232
* g++.dg/cpp0x/Wdtor1.C: New.
From-SVN: r215351
The i386 sfp-machine.h defines FP_TRAPPING_EXCEPTIONS in a way that is
always wrong: it treats a set bit as indicating the exception is
trapping, when actually a set bit (both for 387 and SSE floating
point) indicates it is masked, and a clear bit indicates it is
trapping. This patch fixes this bug.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu.
libgcc:
* config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
bits not set bits as indicating trapping exceptions.
gcc/testsuite:
* gcc.dg/torture/float128-exact-underflow.c: New test.
From-SVN: r215347
2014-09-18 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/62768
* io/inquire.c (inquire_via_unit): Use gfc_unit.filename also when
HAVE_TTYNAME{_R} is not defined.
From-SVN: r215338
PR debug/63284
* tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
if there are only debug stmts after the noreturn call, instead
remove the debug stmts.
* gcc.dg/pr63284.c: New test.
From-SVN: r215331
* ipa-devirt.c (type_pair, default_hashset_traits): New types.
(odr_types_equivalent_p): Use pair hash.
(odr_subtypes_equivalent_p): Likewise, do structural compare
on ODR types that may be mismatched.
(warn_odr): Support warning when only one field is given.
(odr_types_equivalent_p): Strenghten comparsions made;
support VOIDtype.
(add_type_duplicate): Update VISITED hash set.
From-SVN: r215328
2014-09-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.gcc (*-*-rtems*): Default to 'rtems' thread model.
Enable selection of 'posix' or no thread model.
From-SVN: r215324
2014-09-17 Andrew Stubbs <ams@codesourcery.com>
* config/arm/arm.c (arm_option_override): Reject -mfpu=neon
when architecture is older than ARMv7.
From-SVN: r215321