Richard Guenther [Fri, 19 Jun 2009 21:44:24 +0000 (21:44 +0000)]
backport: [multiple changes]
2009-06-19 Richard Guenther <rguenther@suse.de>
Backport from mainline:
2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/36607
* convert.c (convert_to_integer): Treat OFFSET_TYPE like INTEGER_TYPE.
* g++.dg/expr/cast10.C: New test.
2009-02-03 Jakub Jelinek <jakub@redhat.com>
PR target/35318
* function.c (match_asm_constraints_1): Skip over
initial optional % in the constraint.
* gcc.c-torture/compile/pr35318.c: New test.
2009-05-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/40204
* fold-const.c (fold_binary) <case BIT_AND_EXPR>: Avoid infinite
recursion if build_int_cst_type returns the same INTEGER_CST as
arg1.
PR tree-optimization/40087
* tree-ssa-loop-niter.c (number_of_iterations_ne_max,
number_of_iterations_ne): Rename never_infinite argument.
(number_of_iterations_lt_to_ne, number_of_iterations_lt,
number_of_iterations_le): Handle pointer-type ivs when
exit_must_be_taken is false.
(number_of_iterations_cond): Do not always assume that
exit_must_be_taken if the control variable is a pointer.
Richard Guenther [Wed, 17 Jun 2009 13:06:21 +0000 (13:06 +0000)]
re PR middle-end/40404 (Comparison involving unsigned int:17 bitfield seems wrong)
2009-06-17 Richard Guenther <rguenther@suse.de>
PR middle-end/40404
* fold-const.c (fold_binary): Verify the type precision of the
stripped arguments of the comparison are the same before
folding the comparison.
Richard Guenther [Wed, 17 Jun 2009 12:03:08 +0000 (12:03 +0000)]
re PR c++/40389 (optimizer bug (possibly))
2009-06-17 Richard Guenther <rguenther@suse.de>
PR middle-end/40389
* tree-ssa-operands.c (get_modify_stmt_operands): Add NRV
results to the addresses taken bitmap.
* tree-scalar-evolution.c (scev_const_prop): Do not insert
incomplete stmts into the instruction stream.
Richard Guenther [Wed, 17 Jun 2009 12:00:40 +0000 (12:00 +0000)]
re PR middle-end/40460 (Enormous memory usage during compilation with -O2 or -O3 optimizations.)
2009-06-17 Richard Guenther <rguenther@suse.de>
PR middle-end/40460
* tree-chrec.h (build_polynomial_chrec): If we cannot determine
if there is no evolution of left in the loop bail out.
* tree-chrec.c (chrec_fold_multiply_poly_poly): CSE one
chrec_fold_multiply.
Uros Bizjak [Thu, 11 Jun 2009 20:59:16 +0000 (22:59 +0200)]
backport: re PR target/38222 (gcc.target/i386/sse4_2-popcntl.c fails on i686-apple-darwin9)
Backport from mainline:
2008-11-22 Uros Bizjak <ubizjak@gmail.com>
PR target/38222
* config/i386/i386.md (SWI248): New mode iterator.
(popcount<mode>2): Rename from popcounthi2, popcountsi2 and
popcounthi2 insn patterns. Macroize pattern using SWI248 mode
iterator. Generate popcnt mnemonic without mode extensions
for Darwin x86 targets.
(*popcount<mode>2_cmp): Ditto.
(*popcountsi2_cmp_zext): Generate popcnt mnemonic without mode
extensions for Darwin x86 targets.
Eric Botcazou [Sat, 23 May 2009 17:55:35 +0000 (17:55 +0000)]
passes.texi: Standardize spelling of RTL, Tree and Tree SSA.
* doc/passes.texi: Standardize spelling of RTL, Tree and Tree SSA.
Remove outdated reference to flow.c and fix nits.
* doc/gccint.texi: Tweak RTL description.
* doc/rtl.texi: Likewise.
Kaz Kojima [Thu, 21 May 2009 23:31:44 +0000 (23:31 +0000)]
re PR rtl-optimization/40105 (SH: 4.3/4.4 compilers segfault when recompiling itself on gentoo system)
PR rtl-optimization/40105
Backport from mainline:
2009-04-29 Eric Botcazou <ebotcazou@adacore.com>
Steven Bosscher <steven@gcc.gnu.org>
* Makefile.in (cfgrtl.o): Add $(INSN_ATTR_H).
* cfgrtl.c: Include insn-attr.h.
(rest_of_pass_free_cfg): New function.
(pass_free_cfg): Use rest_of_pass_free_cfg as execute function.
2009-04-27 Richard Sandiford <rdsandiford@googlemail.com>
Eric Botcazou <ebotcazou@adacore.com>
* resource.c (find_basic_block): Use BLOCK_FOR_INSN to look up
a label's basic block.
(mark_target_live_regs): Tidy and rework obsolete comments.
Change back DF problem to LIVE. If a label starts a basic block,
assume that all registers that used to be live then still are.
(init_resource_info): If a label starts a basic block, set its
BLOCK_FOR_INSN accordingly.
(free_resource_info): Undo the setting of BLOCK_FOR_INSN.
Jakub Jelinek [Thu, 21 May 2009 13:26:13 +0000 (15:26 +0200)]
re PR target/39942 (Nonoptimal code - leaveq; xchg %ax,%ax; retq)
PR target/39942
* config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Don't emit second
.p2align 3 if MAX_SKIP is smaller than 7.
* config/i386/linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
Richard Earnshaw [Sat, 16 May 2009 22:24:59 +0000 (22:24 +0000)]
re PR target/39501 (-O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi)
PR target/39501
* arm.md (movsfcc): Disable if not TARGET_HARD_FLOAT.
* testsuite/gcc.c-torture/execute/pr39501.c: New file.
* testsuite/gcc.c-torture/execute/pr39501.x: New file.
Uros Bizjak [Thu, 14 May 2009 08:23:31 +0000 (10:23 +0200)]
re PR target/37179 (gcc emits bad opcode 'ffreep')
PR target/37179
* config/i386/driver-i386.c (vendor_signatures): New enum.
(processor_signatures): Ditto.
(host_detect_local_cpu): Use vendor_signatures and
processor_signatures enums. For SIG_AMD vendor, check for
SIG_GEODE processor signature to detect geode processor.
Paul Thomas [Sun, 10 May 2009 16:09:02 +0000 (16:09 +0000)]
re PR fortran/39879 (double free or corruption abort with gfortran)
2009-05-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/39879
* trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
type parentheses argument if it is a variable with allocatable
components.
2009-05-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/39879
* gfortran.dg/alloc_comp_assign_10.f90: New test.
Jakub Jelinek [Thu, 7 May 2009 15:53:11 +0000 (17:53 +0200)]
re PR middle-end/40057 (Incorrect right shift by 31 with long long)
PR middle-end/40057
* dojump.c (prefer_and_bit_test): Use immed_double_const instead of
GEN_INT for 1 << bitnum.
(do_jump) <case BIT_AND_EXPR>: Use build_int_cst_wide_type instead of
build_int_cst_type.
* config/spu/spu.h (enum spu_builtin_type): Move here from
spu-builtins.h.
(struct spu_builtin_description): Likewise. Add GTY marker.
Do not use enum spu_function_code or enum insn_code.
(spu_builtins): Add extern declaration.
* config/spu/spu.c: Do not include "spu-builtins.h".
(enum spu_function_code, enum spu_builtin_type_index,
V16QI_type_node, V8HI_type_node, V4SI_type_node, V2DI_type_node,
V4SF_type_node, V2DF_type_node, unsigned_V16QI_type_node,
unsigned_V8HI_type_node, unsigned_V4SI_type_node,
unsigned_V2DI_type_node): Move here from spu-builtins.h.
(spu_builtin_types): Make static. Add GTY marker.
(spu_builtins): Add extern declaration with GTY marker.
Include "gt-spu.h".
* config/spu/spu-c.c: Do not include "spu-builtins.h".
(spu_resolve_overloaded_builtin): Do not use spu_function_code.
Check programmatically whether all parameters are scalar.
re PR c++/38228 (ICE with invalid use of bound member function)
2009-04-23 Dodji Seketeli <dodji@redhat.com>
gcc/cp/ChangeLog:
PR c++/38228
* pt.c (unify): Do not allow the result of a template argument
deduction to be a METHOD_TYPE.
* cvt.c (cp_convert): Report a meaningful error for non-valid use
of pointer to member functions during conversions.
* call.c (build_new_op): Report a meaningful error for non-valid
use of pointer to member functions in binary expressions.
* typeck.c (invalid_nonstatic_memfn_p): Do not crash when EXPR is
NULL;
gcc/testsuite/ChangeLog:
PR c++/38228
* g++.dg/expr/bound-mem-fun.C: New test.
re PR c++/39639 (no diagnostic for ill-formed pack expansion)
2009-04-22 Dodji Seketeli <dodji@redhat.com>
gcc/cp/ChangeLog:
PR c++/39639
* parser.c (cp_parser_template_argument_list): Display an error
when an ellipsis is not preceded by a parameter pack. Also, warn
about variadic templates usage without -std=c++0x.
gcc/testsuite/ChangeLog:
PR c++/39639
* g++.dg/cpp0x/pr39639.C: New test.
Richard Guenther [Wed, 22 Apr 2009 15:01:45 +0000 (15:01 +0000)]
backport: re PR target/39496 (GCC uses non-standard calling conventions for static functions with -O0.)
2009-04-22 Richard Guenther <rguenther@suse.de>
Backport from mainline:
PR target/39496
* config/i386/i386.c (ix86_function_regparm): Don't optimize local
functions using regparm calling conventions when not optimizing.
(ix86_function_sseregparm): Similarly for sseregparm calling
conventions.
* gcc.target/i386/pr39496.c: New test.
* g++.dg/other/pr39496.C: New test.