PR middle-end/36578
* convert.c (convert_to_real): Do not optimize conversions of
binary arithmetic operations between binary and decimal
floating-point types. Consider mode of target type in determining
decimal type for arithmetic. Unless
flag_unsafe_math_optimizations, do not optimize binary conversions
where this may change rounding behavior.
* real.c (real_can_shorten_arithmetic): New.
* real.h (real_can_shorten_arithmetic): Declare.
testsuite:
* gcc.dg/dfp/convert-bfp-13.c, gcc.dg/dfp/convert-bfp-14.c,
gcc.dg/dfp/convert-dfp-fold-2.c, gcc.target/i386/pr36578-1.c,
gcc.target/i386/pr36578-2.c: New tests.
From-SVN: r141432
* config/bfin/bfin-protos.h (WA_05000257, WA_05000283, WA_05000315,
ENABLE_WA_05000257, ENABLE_WA_05000283, ENABLE_WA_05000315): New.
* config/bfin/bfin.c (bfin_cpus): Add these workaround bits as
appropriate.
(must_save_p): For some workarounds, interrupts need to clobber a
P register.
(expand_prologue_reg_save, expand_epilogue_reg_restore): Save LC0
and LC1 for WA_05000257.
(expand_interrupt_handler_prologue): Add dummy read of CHIPID for
WA_05000283 and WA_05000315.
* config/bfin/bfin.md (UNSPEC_VOLATILE_DUMMY): New constant.
(movbi): Add alternative to set CC to 1; improve code for setting
CC to 0.
(dummy_load): New pattern.
From-SVN: r141431
PR middle-end/37870
* expmed.c (extract_bit_field_1): If int_mode_for_mode returns
BLKmode for non-memory, convert using a wider MODE_INT mode
or through memory.
* gcc.target/i386/pr37870.c: New test.
From-SVN: r141430
2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/26997
cp/
* parser.c (cp_parser_token_starts_cast_expression): New.
(cp_parser_cast_expression): Peek the next token to decide whether
this could be a parenthesized constructor or is definitely an
actual cast.
testsuite/
* g++.dg/parse/pr26997.C: New.
From-SVN: r141429
PR middle-end/37913
* tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Only split bbs
that haven't been removed yet.
* gcc.c-torture/compile/pr37913.c: New test.
From-SVN: r141426
* config/bfin/bfin.c (struct machine_function): New member
has_loopreg_clobber.
(bfin_expand_movmem): Set it when generating memcpy insns.
(n_regs_saved_by_prologue, expand_prologue_reg_save,
expand_epilogue_reg_restore): If we have hardware loops,
memcpy insns (indicated by has_loopreg_clobber) or function
calls, we need to save the loop registers.
From-SVN: r141425
* convert.c (strip_float_extensions): Do not remove or introduce
conversions between binary and decimal floating-point types.
testsuite:
* gcc.dg/dfp/convert-bfp-12.c: New test.
From-SVN: r141407
PR middle-end/37931
* fold-const.c (distribute_bit_expr): Convert common, left and
right arguments to type.
* gcc.c-torture/execute/pr37931.c: New test.
From-SVN: r141406
* config/mn10300/mn10300.h (CALL_REALLY_USED_REGISTERS): Define.
* config/mn10300/mn10300.c (fp_regs_to_save): Test the
call_really_used_regs array rather than the call_used_regs array.
(mn10300_get_live_callee_saved_regs, expand_prologue,
expand_epilogue, output_tst): Likewise.
From-SVN: r141405
PR tree-optimization/37879
* predict.c (tree_estimate_probability): Check if last_stmt is
non-NULL before dereferencing it.
* gcc.dg/pr37879.c: New test.
From-SVN: r141390
2008-10-27 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/37919
Revert:
2008-10-18 Douglas Gregor <doug.gregor@gmail.com>
* include/bits/stl_pair.h (__may_be_null_pointer_init): New.
(pair::pair): Eliminate the redundant pair(U1&&, U2&&) constructor.
Add lvalue pair<U1, U2> constructor to handle non-const pair lvalues.
Remove the old variadic constructor, and instead provide several
variadic constructors that avoid failing when attempting to
initialize a pointer from a null pointer constant.
* testsuite/20_util/pair/moveable.cc (test3): Add new tests with
initialization of pointers from the null pointer constant.
From-SVN: r141388
2008-10-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR middle-end/37316
* pa.c (function_arg_padding): Pad complex and vector types upward in
64-bit runtime.
(function_arg): Use BLKmode for PARALLEL in 64-bit runtime.
From-SVN: r141380
* lib/scanasm.exp (scan-assembler, scan-assembler-not,
scan-hidden, scan-not-hidden, scan-file, scan-file-not,
scan-assembler-times, scan-assembler-dem, scan-assembler-dem-not):
Extract first word of $testcase for all upvar uses, in case
$testvar has compiler switches appended.
From-SVN: r141350
PR tree-optimization/36038
* tree-ssa-loop-ivopts.c (add_old_iv_candidates): For pointer bases
add sizetype IV with initial value zero instead of pointer type.
* gcc.c-torture/compile/pr36038.c: New test.
From-SVN: r141343
2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/7543
* value-prof.c (gimple_stringop_fixed_value): Use parentheses
around bit operation.
* profile.c (is_edge_inconsistent): Likewise.
* fold-const.c (truth_value_p): Move from here...
* tree.h (truth_value_p): ... to here.
* c-tree.h (c_expr): Update description of original_code.
* c-typeck.c (parser_build_unary_op): Set original_code.
(parser_build_binary_op): Update call to warn_about_parentheses.
* c-common.c (warn_about_parentheses): Take two additional
arguments of the operands. Use a switch. Quote operators
appropriately. Define macro APPEARS_TO_BE_BOOLEAN_EXPR_P.
Add warning about !x | y and !x & y.
* c-common.h (warn_about_parentheses): Update declaration.
cp/
* typeck.c (build_x_binary_op): Update call to
warn_about_parentheses.
* parser.c (cp_parser_binary_expression): Add note about passing
the correct code for unary expressions.
testsuite/
* gcc.dg/Wparentheses-11.c: New.
* g++.dg/warn/Wparentheses-25.C: New. XFAILED.
From-SVN: r141340
contrib/
* dg-extract-results.sh: New file.
gcc/
* Makefile.in (lang_checks_parallelized, check_gcc_parallelize,
check_p_tool, check_p_vars, check_p_subno, check_p_comma,
check_p_subwork, check_p_numbers, check_p_subdir, check_p_subdirs):
New variables.
(check-subtargets, check-%-subtargets, check-parallel-%): New
targets.
(check-%): For test targets listed in lang_checks_parallelized
if -j is used and RUNTESTFLAGS doesn't specify tests to execute,
run the testing in multiple make goals, possibly parallel, and
afterwards run dg-extract-results.sh to merge the sum and log files.
gcc/cp/
* Make-lang.in (check-c++-subtargets): New alias for
check-g++-subtargets.
(lang_checks_parallelized): Add check-g++.
(check_g++_parallelize): New variable.
gcc/fortran/
* Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New
aliases for check-gfortran-subtargets.
(lang_checks_parallelized): Add check-gfortran.
(check_gfortran_parallelize): New variable.
gcc/ada/
* gcc-interface/Make-lang.in (check-ada-subtargets): Depend on
check-acats-subtargets and check-gnat-subtargets.
(check_acats_targets): New variable.
(check-acats-subtargets, check-acats%): New targets.
(check-acats): If -j is used and CHAPTERS is empty, run the testing
in multiple make goals, possibly parallel, and afterwards run
dg-extract-results.sh to merge the sum and log files.
gcc/java/
* Make-lang.in (check-java-subtargets): New target.
libstdc++-v3/
* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Remove dejagnu.
(RUNTESTDEFAULTFLAGS, EXPECT, check_DEJAGNU_normal_targets): New
variables.
(%/site.exp, check-DEJAGNU%): New targets.
(check-am): Run $(MAKE) check-DEJAGNU.
* testsuite/Makefile.in: Regenerated.
From-SVN: r141337
PR target/35485
* configure.ac: AIX threads are Posix threads.
Set signal handler to aix-signal.h
* configure: Regenerate.
* classpath/native/fdlibm/fdlibm.h: Undef hz.
* include/aix-signal.h: New file.
* sysdep/powerpc/locks.h: Avoid GNU Assembler syntax.
From-SVN: r141335