Uros Bizjak [Tue, 4 Nov 2008 13:29:43 +0000 (14:29 +0100)]
driver-i386.c (enum vendor_signatures): New enum.
* config/i386/driver-i386.c (enum vendor_signatures): New enum.
(host_detect_local_cpu): Use it instead of casted strings to
compare vendor signatures.
Steve Ellcey [Mon, 3 Nov 2008 21:47:44 +0000 (21:47 +0000)]
omp-low.c (expand_omp_for_generic): If iter_type has different precision than type and type is a pointer type...
* omp-low.c (expand_omp_for_generic): If iter_type has different
precision than type and type is a pointer type, cast n1 and n2
first to an integer type with the same precision as pointers
and only afterwards to iter_type.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r141563
Andrew Pinski [Mon, 3 Nov 2008 20:01:11 +0000 (20:01 +0000)]
re PR rtl-optimization/37782 (Stage2 ada compiler miscompiled)
2008-11-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR rtl-opt/37782
* loop-doloop.c (doloop_modify): Add from_mode argument that says what
mode count is in.
(doloop_optimize): Update call to doloop_modify.
Sebastian Pop [Mon, 3 Nov 2008 16:35:13 +0000 (16:35 +0000)]
re PR bootstrap/36908 (bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution")
2008-11-03 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/36908
* testsuite/gcc.dg/tree-ssa/pr36908.c: New.
* tree-loop-distribution.c (number_of_rw_in_rdg): New.
(number_of_rw_in_partition): New.
(partition_contains_all_rw): New.
(ldist_gen): Do not distribute when one of the partitions
contains all the memory operations.
Paul Thomas [Mon, 3 Nov 2008 06:44:47 +0000 (06:44 +0000)]
re PR fortran/37445 (Host-associated proc not found if same-name generic is use-associated)
2008-11-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37445
* resolve.c (resolve_actual_arglist ): Correct comparison of
FL_VARIABLE with e->expr_type.
(resolve_call): Check that host association is correct.
(resolve_actual_arglist ): Remove return is old_sym is use
associated. Only reparse expression if old and new symbols
have different types.
PR fortran/PR35769
* resolve.c (gfc_resolve_assign_in_forall): Change error to a
warning.
2008-11-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37445
* gfortran.dg/host_assoc_call_3.f90: New test.
* gfortran.dg/host_assoc_call_4.f90: New test.
* gfortran.dg/host_assoc_function_4.f90: New test.
Janus Weil [Sat, 1 Nov 2008 21:56:27 +0000 (22:56 +0100)]
re PR fortran/36426 (Endless loop in gfc_apply_interface_mapping_to_expr)
2008-11-01 Janus Weil <janus@gcc.gnu.org>
PR fortran/36426
* expr.c (replace_symbol): Replace all symbols which lie in the
formal namespace of the interface and copy their attributes.
* resolve.c (resolve_symbol): Add charlen to namespace.
Daniel Kraft [Sat, 1 Nov 2008 13:26:19 +0000 (14:26 +0100)]
re PR fortran/35681 (wrong result for vector subscripted array expression in MVBITS)
2008-11-01 Daniel Kraft <d@domob.eu>
PR fortran/35681
* gfortran.h (struct gfc_code): New field `resolved_isym'.
* trans.h (gfc_build_memcpy_call): Made public.
* trans-array.h (gfc_trans_create_temp_array): New argument `initial'.
* intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym.
* iresolve.c (create_formal_for_intents): New helper method.
(gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym.
* resolve.c (resolve_call): Initialize resolved_isym to NULL.
* trans-array.c (gfc_trans_allocate_array_storage): New argument
`initial' to allow initializing the allocated storage to some initial
value copied from another array.
(gfc_trans_create_temp_array): Allow initialization of the temporary
with a copy of some other array by using the new extension.
(gfc_trans_array_constructor): Pass NULL_TREE for initial argument.
(gfc_conv_loop_setup): Ditto.
* trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto.
* trans-expr.c (gfc_conv_function_call): Ditto.
(gfc_build_memcpy_call): Made public.
* trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created
temporary for INTENT(INOUT) arguments to the value of the mirrored
array and clean up the temporary as very last intructions in the created
block.
* trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call
and enable elemental dependency checking if we have.
2008-11-01 Daniel Kraft <d@domob.eu>
PR fortran/35681
* gfortran.dg/mvbits_4.f90: New test.
Jakub Jelinek [Fri, 31 Oct 2008 21:33:47 +0000 (22:33 +0100)]
re PR c++/37967 (ICE with function returning auto)
PR c++/37967
* decl.c (grokdeclarator): Diagnose auto function decl without
late return type and late return type function decl where type
is not auto.
Mikael Morin [Fri, 31 Oct 2008 15:56:21 +0000 (16:56 +0100)]
re PR fortran/35840 (ICE for character expression in I/O specifier)
2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/35840
* expr.c (gfc_reduce_init_expr): New function, containing checking code
from gfc_match_init_expr, so that checking can be deferred.
(gfc_match_init_expr): Use gfc_reduce_init_expr.
* io.c (check_io_constraints): Use gfc_reduce_init_expr instead of
checking that the expression is a constant.
* match.h (gfc_reduce_init_expr): Prototype added.
2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/35840
* gfortran.dg/write_check4.f90: New test.
Mikael Morin [Fri, 31 Oct 2008 15:37:17 +0000 (16:37 +0100)]
[multiple changes]
2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/35820
* resolve.c (gfc_count_forall_iterators): New function.
(gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate
the needed memory amount to allocate. Don't forget to free allocated
memory. Add an assertion to check for memory leaks.
2008-10-16 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/35820
* gfortran.dg/nested_forall_1.f: New test.
Steven G. Kargl [Fri, 31 Oct 2008 04:45:28 +0000 (04:45 +0000)]
re PR fortran/37930 (gfortran error and ICE at automatic type conversion with transfer intrinsic)
2008-10-30 Steven G. Kargl <kargls@comcast.net>
PR fortran/37930
* fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values.
Remove stale comment and kludge code for MPFR 2.0.1 and older.
(gfc_real2int): Error on conversion of NaN or Inf.
(gfc_complex2int): Ditto.
* fortran/arith.h: Update mpfr_to_mpz prototype.
* fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
calls to include locus.
Mikael Morin [Thu, 30 Oct 2008 20:45:09 +0000 (21:45 +0100)]
re PR fortran/37903 (wrong-code for complicated vector subscripts)
2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/37903
* trans-array.c (gfc_trans_create_temp_array): If n is less
than the temporary dimension, assert that loop->from is
zero (reverts to earlier versions). If there is at least one
null loop->to[n], it is a callee allocated array so set the
size to NULL and break.
(gfc_trans_constant_array_constructor): Set the offset to zero.
(gfc_trans_array_constructor): Remove loop shifting around the
temporary creation.
(gfc_conv_loop_setup): Prefer zero-based descriptors if
possible. Calculate the translation from loop variables to
array indices if an array constructor.
2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/37749
* trans-array.c (gfc_trans_create_temp_array): If size is NULL
use the array bounds for loop->to.
2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/37903
* gfortran.dg/vector_subscript_4.f90: New test.
2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/37749
* gfortran.dg/vector_subscript__5.f90: New test.
Joseph Myers [Wed, 29 Oct 2008 17:05:42 +0000 (17:05 +0000)]
re PR middle-end/36578 (cast to long double not taken into account when result stored to a double)
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.
Bernd Schmidt [Wed, 29 Oct 2008 16:37:22 +0000 (16:37 +0000)]
bfin-protos.h (WA_05000257, [...]): New.
* 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.
Jakub Jelinek [Wed, 29 Oct 2008 16:07:39 +0000 (17:07 +0100)]
re PR middle-end/37870 (ICE in extract_bit_field_1)
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.
re PR c++/26997 (g++ reports misleading error message when the identifier with error occurs earlier on the same line)
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.
Bernd Schmidt [Wed, 29 Oct 2008 15:12:28 +0000 (15:12 +0000)]
bfin.c (struct machine_function): New member has_loopreg_clobber.
* 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.
Nick Clifton [Tue, 28 Oct 2008 09:45:37 +0000 (09:45 +0000)]
mn10300.h (CALL_REALLY_USED_REGISTERS): Define.
* 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.