2007-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/32770
* gfortran.fortran-torture/execute/equiv_5.f: Set kind on
integers so tests works with -fdefault-integer-8.
* gfortran.fortran-torture/execute/elemental.f90: Use default
integers so test passes with -fdefault-integer-8.
* gfortran.fortran-torture/execute/der_io.f90: Increase
buffer length so test passes with -fdefault-integer-8.
* gfortran.dg/bounds_check_8.f90: Likewise.
* gfortran.dg/arrayio_derived_1.f90: LIkewise.
* gfortran.dg/equiv_7.f90: Set kind so test passes
with -fdefault-integer-8.
* gfortran.dg/g77/20030326-1.f: Set kind explicitly to
provoke overflow.
From-SVN: r130279
2007-11-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* trans-expr.c (gfc_conv_missing_dummy): Set the type of the dummy
argument to default integer if flagged to do so. Fix typo in comment.
* resolve.c (gfc_resolve_dim_arg): Whitespace cleanup.
* iresolve.c (gfc_resolve_cshift): Do not convert type, mark attribute
for converting the DIM type appropriately in trans-expr.c.
(gfc_resolve_eoshift): Likewise.
* check.c (dim_check): Remove pre-existing dead code.
(gfc_check_cshift): Enable dim_check to allow DIM as an optional.
(gfc_check_eoshift): Likewise.
* trans_intrinsic.c (gfc_conv_intrinsic_function_args): Fix whitespace.
From-SVN: r130276
PR middle-end/33335
* optabs.h (optab_table): Change type to struct optab from optab.
(convert_optab_table): Similarly.
Adjust all _optab macros to expand to addresses of optab_table
resp. convert_optab_table elements rather than the values of the
elements.
* optabs.c (optab_table): Change typype to struct optab from optab.
If compiled by recent GCC, initialize all the insn_code fields in
the array using designated range initializers.
(convert_optab_table): Similarly.
(convert_optab_libfunc, optab_libfunc, set_optab_libfunc,
set_conv_libfunc): Into libfunc_entry's optab field store index within
optab_table resp. convert_optab_table array instead of difference
between two separately malloced addresses.
(new_optab): Add op argument, don't return anything. Initialize
just the insn_code field in handlers array and only when needed.
(init_optab, init_optabv): Add op argument, don't return anything.
Adjust new_optab caller.
(new_convert_optab): Removed.
(init_convert_optab): Add op argument, don't return anything, don't
call new_convert_optab. If needed, initialize insn_code field in
handlers array.
(init_optabs): Adjust init_optab, init_optabv and init_convert_optab
callers.
(debug_optab_libfuncs): Adjust uses of optab_table and
convert_optab_table arrays.
From-SVN: r130274
2007-11-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31608
* trans-array.c (gfc_conv_expr_descriptor): Remove exception
for indirect references in the call to gfc_trans_scalar_assign.
* trans-expr.c (gfc_conv_string_parameter): Instead of asserting
that the expression is not an indirect reference, cast it to a
pointer type of the length given by se->string_length.
2007-11-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31608
* gfortran.dg/char_cast_2.f90: New test based on achar_4.f90.
From-SVN: r130271
2007-11-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34127
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Make code match up the comments, require compatibility of the
pointed-to types.
* gcc.c-torture/compile/pr34127.c: New testcase.
From-SVN: r130269
* gcc.target/powerpc/altivec-23.c: Do not use a typedef name as a
type specifier, as they are not permitted according to the AltiVec
Programming Interface Manual.
From-SVN: r130268
2007-11-16 David Daney <ddaney@avtrex.com>
Andrew Haley <aph@redhat.com>
* constants.c (build_constants_constructor): Use POINTER_SIZE
insead of BITS_PER_WORD in big-endian work around.
From-SVN: r130267
PR fortran/25252
* interface.c (gfc_current_interface_head,
gfc_set_current_interface_head): New functions.
* decl.c (gfc_match_modproc): Move check for syntax error earlier.
On syntax error, restore previous state of the interface.
* gfortran.h (gfc_current_interface_head,
gfc_set_current_interface_head): New prototypes.
* gfortran.dg/interface_22.f90: New test.
From-SVN: r130259
PR fortran/34108
* io.c (check_format_string): Only check character expressions.
(match_dt_format): Return MATCH_ERROR if that is what
gfc_match_st_label said.
* gfortran.dg/fmt_label_1.f90: New test.
From-SVN: r130249
2007-11-17 Andreas Tobler <a.tobler@schweiz.org>
* src/powerpc/sysv.S: Load correct cr to compare if we have long double.
* src/powerpc/linux64.S: Likewise.
* src/powerpc/ffi.c: Add a comment to show which part goes into cr6.
* testsuite/libffi.call/return_ldl.c: New test.
From-SVN: r130247
2007-11-16 Richard Guenther <rguenther@suse.de>
PR middle-end/34030
* fold-const.c (fold_binary): Use correct types for folding
1 << X & Y to Y >> X & 1.
* gcc.c-torture/compile/pr34030.c: New testcase.
From-SVN: r130238
2007-11-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34008
* trans-stmt.c (gfc_conv_elemental_dependencies): Add check for
INTENT_INOUT as well as INTENT_OUT.
(gfc_trans_call): Remove redundant gcc_asserts in dependency
check.
2007-11-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34008
* gfortran.dg/interface_assignment_3.f90.
From-SVN: r130232
2007-11-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33986
* trans-array.c (gfc_conv_array_parameter ): Allow allocatable
function results.
2007-11-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33986
* gfortran.dg/allocatable_function_3.f90.
From-SVN: r130228
2007-11-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34113
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Use correct conversion direction for checking type compatibility.
* gcc.c-torture/compile/pr34113.c: New testcase.
From-SVN: r130223
2007-11-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34099
* tree-ssa-ccp.c (likely_value): Use a whitelist for operators
that produce UNDEFINED result if at least one of its operands
is UNDEFINED. By default the result is only UNDEFINED if all
operands are UNDEFINED.
* g++.dg/torture/pr3499.C: New testcase.
* gcc.c-torture/execute/pr34099.c: Likewise.
From-SVN: r130222
2007-11-16 Olivier Hainque <hainque@adacore.com>
ada/
* utils2.c (build_call_alloc_dealloc) <if gnu_obj>: Move the code
retrieving an allocator return value from a super-aligned address from
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.
testsuite/
* gnat.dg/release_unc_maxalign.adb: New test.
From-SVN: r130221
PR c++/34100
* pt.c (apply_late_template_attributes): Do nothing if decl's type is
error_mark_node.
* g++.dg/template/crash73.C: New test.
From-SVN: r130220