* 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.
re PR c++/39637 (ICE on ill-formed sizeof(<parameter-pack>) in variadic template)
gcc/cp/ChangeLog:
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* parser.c (cp_parser_enumerator_definition): Make sure the
initializer of the enumerator doesn't contain any bare parameter pack.
Jerry DeLisle [Sat, 4 Apr 2009 19:04:53 +0000 (19:04 +0000)]
re PR fortran/39528 (repeated entries are not read when using list-directed input)
2009-04-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/39528
* gfortran.dg/read_repeat.f90: New test.
2009-04-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/39528
Backport from trunk.
* io/list_read.c (list_formatted_read_scalar): Move check for read
completion to just after the check for a repeated value.
Jason Merrill [Fri, 3 Apr 2009 18:04:39 +0000 (14:04 -0400)]
PR c++/38030, 38850, 39070
PR c++/38030, 38850, 39070
* pt.c (type_dependent_expression_p_push): New fn.
(tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
substitution makes the call non-dependent. Preserve koenig_p.
* parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
for non-dependent calls.
* semantics.c (finish_call_expr): Revert earlier changes.
* cp-tree.h: Revert change to finish_call_expr prototype.
Jason Merrill [Fri, 3 Apr 2009 17:31:38 +0000 (13:31 -0400)]
revert: re PR c++/9634 ([DR224] Injected class name as qualifier should not make the name dependent)
Revert:
PR c++/9634
PR c++/29469
PR c++/29607
Implement DR 224.
* decl.c (make_typename_type): Do look inside currently open classes.
* parser.c (cp_parser_lookup_name): Likewise.
(cp_parser_template_name): Likewise.
* pt.c (dependent_scope_p): New function.
* cp-tree.h: Declare it.
* class.c (currently_open_class): Return fast if T isn't a class.
David Ayers [Thu, 2 Apr 2009 12:40:48 +0000 (12:40 +0000)]
re PR objc/27377 (false compiler warnings generated in Objective-C code)
gcc/
2009-03-29 David Ayers <ayers@fsfe.org>
PR objc/27377
* c-typeck.c (build_conditional_expr): Emit ObjC warnings
by calling objc_compare_types and surpress warnings about
incompatible C pointers that are compatible ObjC pointers.
gcc/testsuite/
2009-03-29 David Ayers <ayers@fsfe.org>
PR objc/27377
* objc.dg/conditional-1.m: New tests.
Eric Botcazou [Wed, 1 Apr 2009 20:48:33 +0000 (20:48 +0000)]
re PR rtl-optimization/39588 (internal compiler error: in trunc_int_for_mode, at explow.c:55)
PR rtl-optimization/39588
* combine.c (merge_outer_ops): Do not set the constant when this
is not necessary.
(simplify_shift_const_1): Do not modify it either in this case.
Ben Elliston [Wed, 25 Mar 2009 22:05:08 +0000 (22:05 +0000)]
backport: re PR target/39175 (ICE while compiling qt-4.5.0-rc1)
Backport from mainline:
2009-02-19 Jakub Jelinek <jakub@redhat.com>
PR target/39175
* c-common.c (c_determine_visibility): If visibility changed and
DECL_RTL has been already set, call make_decl_rtl to update symbol
flags.
cp/
* decl2.c (determine_visibility): If visibility changed and
DECL_RTL has been already set, call make_decl_rtl to update symbol
flags.
testsuite/
* gcc.dg/visibility-20.c: New test.
* g++.dg/ext/visibility/visibility-11.C: New test.
Uros Bizjak [Mon, 23 Mar 2009 11:19:41 +0000 (12:19 +0100)]
backport: re PR target/39482 (ICE in inline_secondary_memory_needed, at config/i386/i386.c:25478)
Backport from mainline:
2009-03-17 Uros Bizjak <ubizjak@gmail.com>
PR target/39482
* config/i386/i386.md (*truncdfsf_mixed): Avoid combining registers
from different units in a single alternative.
(*truncdfsf_i387): Ditto.
(*truncxfsf2_mixed): Ditto.
(*truncxfdf2_mixed): Ditto.
testsuite/ChangLog:
Backport from mainline:
2009-03-17 Uros Bizjak <ubizjak@gmail.com>
PR target/39482
* gcc.target/i386/pr39482.c: New test.
Paul Thomas [Sat, 7 Mar 2009 15:58:49 +0000 (15:58 +0000)]
re PR fortran/39295 (Too strict interface conformance check)
2009-03-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/39295
* interface.c (compare_type_rank_if): Return 1 if the symbols
are the same and deal with external procedures where one is
identified to be a function or subroutine by usage but the
other is not.
2009-03-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/39295
* gfortran.dg/interface_25.f90: New test.
* gfortran.dg/interface_26.f90: New test.
Jason Merrill [Wed, 4 Mar 2009 19:37:43 +0000 (14:37 -0500)]
re PR c++/9634 ([DR224] Injected class name as qualifier should not make the name dependent)
PR c++/9634
PR c++/29469
PR c++/29607
Implement DR 224.
* decl.c (make_typename_type): Do look inside currently open classes.
* parser.c (cp_parser_lookup_name): Likewise.
(cp_parser_template_name): Likewise.
* pt.c (dependent_scope_p): New function.
* cp-tree.h: Declare it.
* class.c (currently_open_class): Return fast if T isn't a class.
Co-Authored-By: Giovanni Bajo <giovannibajo@gcc.gnu.org>
From-SVN: r144621
Martin Jambor [Sat, 28 Feb 2009 18:33:27 +0000 (19:33 +0100)]
backport: re PR middle-end/37861 (Bogus array bounds warning)
2009-02-28 Martin Jambor <mjambor@suse.cz>
Backport from mainline:
2008-12-02 Martin Jambor <mjambor@suse.cz>
PR middle-end/37861
* tree-ssa-forwprop.c
(forward_propagate_addr_into_variable_array_index): Check that the
offset is not computed from a MULT_EXPR if element size is one.