Commit Graph

109261 Commits

Author SHA1 Message Date
Jason Merrill
669baa1576 re PR c++/47049 ([C++0x] ICE in write_unnamed_type_name with lambda use)
PR c++/47049
	* semantics.c (maybe_add_lambda_conv_op): Fix COMDAT sharing.
	* decl.c (start_preparsed_function): Don't call comdat_linkage for
	a template.

From-SVN: r174375
2011-05-27 20:53:49 -04:00
Jonathan Wakely
faa0051112 future (launch): Update enumerators and define operators required for bitmask type.
2011-05-28  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future (launch): Update enumerators and define
	operators required for bitmask type. Remove trailing whitespace.
	* src/future.cc: Remove trailing whitespace.
	* testsuite/30_threads/async/any.cc: Adjust.
	* testsuite/30_threads/async/sync.cc: Adjust.
	* testsuite/30_threads/async/launch.cc: New.

From-SVN: r174374
2011-05-28 01:24:11 +01:00
GCC Administrator
6ffe882a61 Daily bump.
From-SVN: r174373
2011-05-28 00:18:20 +00:00
Jonathan Wakely
84b63c01f8 future: Use noexcept.
2011-05-28  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future: Use noexcept.
	* src/future.cc: Likewise.

From-SVN: r174368
2011-05-28 00:25:54 +01:00
Ian Lance Taylor
76aa42d266 Change export code to use the backend interface.
* go-backend.c: Include "output.h".
	(go_write_export_data): New function.
	* go-c.h (go_write_export_data): Declare.
	* Make-lang.in (go/go-backend.o): Depend on output.h.
	(go/export.o): Depend on $(GO_C_H).  Do not depend on
	$(MACHMODE_H), output.h, or $(TARGET_H).

From-SVN: r174366
2011-05-27 22:46:11 +00:00
Jonathan Wakely
d112944143 thread (this_thread::sleep_until): Move after sleep_for.
2011-05-27  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/thread (this_thread::sleep_until): Move after sleep_for.

From-SVN: r174365
2011-05-27 22:37:53 +01:00
Tobias Burnus
5aacb11e06 re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-05-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * check.c (gfc_check_associated, gfc_check_null): Add coindexed
        * check.
        * match.c (gfc_match_nullify): Ditto.
        * resolve.c (resolve_deallocate_expr): Ditto.
        * trans-types.c (gfc_get_nodesc_array_type): Don't set
        * restricted
        for nonpointers.

2011-05-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_22.f90: New.

From-SVN: r174364
2011-05-27 23:29:19 +02:00
Andrew Pinski
fc64b4481d re PR other/48981 (bootstrap-lto -O3 produces miscompiled, broken gcc)
2011-05-27  Andrew Pinski  <pinskia@gmail.com>

	PR middle-end/48981
	* gengtype.c (vec_prefix_type): New function.
	(note_def_vec): Use vec_prefix_type and change the length
	attribute to be based on the prefix.
	* vec.c: Include coretypes.h before vec.h.
	(struct vec_prefix): Remove.
	(vec_gc_p_reserve): Change the offsetof to sizeof.
	(vec_gc_p_reserve_exact): Likewise.
	(vec_heap_p_reserve): Likewise.
	(vec_heap_p_reserve_exact): Likewise.
	(vec_stack_o_reserve_1): Copy from +1 instead of from vec.
	(vec_stack_p_reserve): Change the offsetof to sizeof.
	(vec_stack_p_reserve_exact): Likewise.
	* vec.h (struct vec_prefix): New struct definition.
	(VEC_T(T,B)): Use vec_prefix instead of having num/alloc fields.
	(VEC_T_GTY(T,B)): Likewise.
	(DEF_VEC_FUNC_P(T)): Use prefix field.
	(DEF_VEC_NONALLOC_FUNCS_O(T,A)): Likewise.
	(DEF_VEC_NONALLOC_FUNCS_I(T,A)): Likewise.

From-SVN: r174359
2011-05-27 13:19:13 -07:00
Bill Schmidt
226855f060 re PR tree-optimization/46728 (GCC does not generate fmadd for pow (x, 0.75)+y on powerpc)
2011-05-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/46728
	* gcc.target/powerpc/pr46728-1.c: New.
	* gcc.target/powerpc/pr46728-2.c: New.
	* gcc.target/powerpc/pr46728-3.c: New.
	* gcc.target/powerpc/pr46728-4.c: New.
	* gcc.target/powerpc/pr46728-5.c: New.
	* gcc.dg/pr46728-6.c: New.
	* gcc.target/powerpc/pr46728-7.c: New.
	* gcc.target/powerpc/pr46728-8.c: New.
	* gcc.dg/pr46728-9.c: New.
	* gcc.target/powerpc/pr46728-10.c: New.
	* gcc.target/powerpc/pr46728-11.c: New.
	* gcc.dg/pr46728-12.c: New.
	* gcc.target/powerpc/pr46728-13.c: New.
	* gcc.target/powerpc/pr46728-14.c: New.
	* gcc.target/powerpc/pr46728-15.c: New.
	* gcc.target/powerpc/pr46728-16.c: New.

From-SVN: r174358
2011-05-27 19:39:07 +00:00
Jason Merrill
a47d328ff3 re PR c++/47132 ([C++0x] decltype can't deduce some operator return types when defining an auto function's return)
PR c++/47132
	* mangle.c (write_expression): Handle MODOP_EXPR.

From-SVN: r174357
2011-05-27 15:32:30 -04:00
Jason Merrill
69cf9a1cfe re PR c++/49176 ([c++0x] valid code rejected with "error: uninitialized const")
PR c++/49176
	* g++.dg/template/const5.C: New.

From-SVN: r174356
2011-05-27 15:32:22 -04:00
Jason Merrill
1fbbe7d6b2 re PR c++/47277 ([C++0x] pseudo destructor code that cause an internal compiler error with std=gnu++0x)
PR c++/47277
	* parser.c (cp_parser_unqualified_id): Don't check
	constructor_name_p for enums.

From-SVN: r174355
2011-05-27 15:32:14 -04:00
Jason Merrill
6d258f3157 re PR c++/47687 ([C++0x] Crash on a lambda returning a lambda (using std::function))
PR c++/47687
	* pt.c (dependent_type_p_r): Avoid infinite recursion.

From-SVN: r174354
2011-05-27 15:32:07 -04:00
Jason Merrill
87fd3cf18a re PR c++/48284 ([C++0x] incorrect printing of decltype operand in diagnostic)
PR c++/48284
	* error.c (dump_expr) [COMPONENT_REF]: Use pp_cxx_dot
	with INDIRECT_REF of REFERENCE_TYPE.

From-SVN: r174353
2011-05-27 15:31:59 -04:00
Jason Merrill
0453694246 re PR c++/49181 ([C++0x] Error reporting routines re-entered)
PR c++/49181
	* pt.c (get_mostly_instantiated_function_type): Use push_access_scope.

From-SVN: r174352
2011-05-27 15:31:51 -04:00
Jakub Jelinek
4cc4f2f437 re PR c++/49165 (ICE on for-loop/throw combination)
PR c++/49165
	* c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
	C++ don't call c_common_truthvalue_conversion on void type arms.

	* g++.dg/eh/cond6.C: New test.

From-SVN: r174350
2011-05-27 21:19:36 +02:00
Bill Schmidt
ba869341b4 re PR tree-optimization/46728 (GCC does not generate fmadd for pow (x, 0.75)+y on powerpc)
2011-05-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/46728
	* tree-ssa-math-opts.c (powi_as_mults_1): Add gimple_set_location.
	(powi_as_mults): Add gimple_set_location.
	(build_and_insert_call): New.
	(gimple_expand_builtin_pow): Add handling for pow(x,y) when y is
	0.5, 0.25, 0.75, 1./3., or 1./6.

From-SVN: r174349
2011-05-27 19:11:19 +00:00
Tobias Burnus
2514987fa9 re PR fortran/48820 (TR 29113: Implement parts needed for MPI 3)
2011-05-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/48820
        * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
        * intrinsic.c (add_functions): Add rank intrinsic.
        (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
        * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add
        * prototypes.
        * simplify.c (gfc_simplify_rank): New function.
        * intrinsic.texi (RANK): Add description for rank intrinsic.
        * check.c (gfc_check_rank): New function.

2011-05-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/48820
        * gfortran.dg/rank_3.f90: New.
        * gfortran.dg/rank_4.f90: New.

From-SVN: r174348
2011-05-27 20:51:31 +02:00
Nathan Froyd
f97b516f9a * MAINTAINERS (Write After Approval): Update my email address.
From-SVN: r174347
2011-05-27 18:13:42 +00:00
Alexander Monakov
d296760d14 contrib.texi: Update copyright years.
2011-05-27  Alexander Monakov  <amonakov@ispras.ru>

	* doc/contrib.texi: Update copyright years.
	(Contributors): Add Zdenek Sojka.

From-SVN: r174344
2011-05-27 21:54:35 +04:00
Nathan Froyd
38e01f9ec9 move TS_STATEMENT_LIST to be a substructure of TS_TYPED
move TS_STATEMENT_LIST to be a substructure of TS_TYPED
gcc/
	* c-decl.c (c_push_function_context): Copy the current statement
	list stack.
	(add_stmt): Check building_stmt_list_p and push_stmt if necessary.
	(finish_struct): Call building_stmt_list_p instead of checking
	cur_stmt_list.
	* c-parser.c (c_parser_postfix_expression): Likewise.
	* c-typeck.c (c_end_compound_stmt): Likewise.
	* print-tree.c (print_node) [STATEMENT_LIST]: Don't print TREE_CHAIN.
	* tree-iterator.c (stmt_list_cache): Change to a VEC.
	(alloc_stmt_list): Adjust for stmt_list_cache's new type.
	(free_stmt_list): Likewise.
	* tree.h (struct tree_statement_list): Include typed_tree instead
	of tree_common.
	* tree.c (initialize_tree_contains_struct): Mark TS_STATEMENT_LIST
	as TS_TYPED instead of TS_COMMON.

gcc/c-family/
	* c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
	(stmt_list_stack): Define.
	(cur_stmt_list): Adjust for new type of x_cur_stmt_list.
	* c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.

gcc/cp/
	* cp-tree.h (building_stmt_tree): Delete.
	* decl.c (save_function_data): Tweak initializer for x_cur_stmt_list.
	(build_aggr_init_full_exprs): Call building_stmt_list_p
	instead of building_stmt_tree.
	(initialize_local_var): Likewise.
	(finish_function): Likewise.
	* decl2.c (finish_anon_union): Likewise.
	* init.c (begin_init_stmts): Likewise.
	(finish_init_stmts): Likewise.
	(expand_aggr_init_1): Likewise.
	* name-lookup.c (do_local_using_decl): Likewise.
	(do_namespace_alias): Likewise.
	(do_using_directive): Likewise.
	(cp_emit_debug_info_for_using): Likewise.
	* semantics.c (add_stmt): Assert that stmt_list_stack is non-empty.

From-SVN: r174343
2011-05-27 17:43:44 +00:00
Paolo Carlini
e330aa5b35 re PR libstdc++/49187 (parallel mode compilation broken - unqualified lookup? (bisected))
2011-05-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49187
	* include/parallel/losertree.h: Add missing using declarations
	of _Base::_M_comp.
	* include/parallel/algobase.h: Include <parallel/algorithmfwd.h>.
	* include/parallel/multiway_merge.h: Include <parallel/
	multiseq_selection.h>, forward declare __merge_advance.
	* include/parallel/multiseq_selection.h: Don't include <parallel/
	sort.h> here.
	* include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp: Fix
	qualification of upper_bound.

	* testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc:
	Use dg-require-debug-mode.
	* testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc:
	Likewise.

	* include/parallel/algo.h: Minor uglification fixes.

From-SVN: r174342
2011-05-27 16:35:36 +00:00
Janis Johnson
0219becc2c tree-ssa-pr43411.C: Rename function to be inlined and replace dump search.
* g++.dg/tree-ssa-pr43411.C: Rename function to be inlined and
	replace dump search.

From-SVN: r174341
2011-05-27 16:11:27 +00:00
Rainer Orth
8950516e0b configure.ac (gcc_cv_as_ix86_tlsgdplt): Check for @tlsgdplt
2011-05-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
	    Uros Bizjak <ubizjak@gmail.com>

	* configure.ac (gcc_cv_as_ix86_tlsgdplt): Check for @tlsgdplt
	(HAVE_AS_IX86_TLSGDPTL): Define.
	(gcc_cv_as_ix86_tlsldmplt): Check for @tlsldmplt.
	(HAVE_AS_IX86_TLSLDMPLT): Define.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/i386/i386.c (ix86_print_operand): Handle code 'p'.
	* config/i386/i386.md (*tls_global_dynamic_32_gnu): If
	TARGET_SUN_TLS, use @tlsgdplt or @plt.
	(*tls_global_dynamic_64): Use @plt if TARGET_SUN_TLS.
	(*tls_local_dynamic_base_32_gnu): If TARGET_SUN_TLS, use
	@tlsldmplt or @plt.
	(*tls_local_dynamic_base_64): Use @plt if TARGET_SUN_TLS.

Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>

From-SVN: r174340
2011-05-27 15:45:56 +00:00
Eric Botcazou
fd5dbe4f5e bit_packed_array5.ads: Move dg directive to...
* gnat.dg/bit_packed_array5.ads: Move dg directive to...
	* gnat.dg/bit_packed_array5.adb: ...here.

From-SVN: r174338
2011-05-27 14:25:39 +00:00
Paolo Carlini
efaa76b31d re PR c++/42056 (ICE with invalid use of auto in template)
/cp
2011-05-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/42056
	* typeck2.c (build_functional_cast): Complain early for invalid uses
	of 'auto' and set type to error_mark_node.

/testsuite
2011-05-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/42056
	* testsuite/g++.dg/cpp0x/auto25.C: New.

From-SVN: r174337
2011-05-27 14:21:33 +00:00
Bernd Schmidt
b0bd15f7aa sched-int.h (struct _haifa_deps_insn_data): New members cond and reverse_cond.
* sched-int.h (struct _haifa_deps_insn_data): New members cond
	and reverse_cond.
	(INSN_COND, INSN_REVERSE_COND): New macros.
	* sched-deps.c (deps_analyze_insn): Call sched_get_condition_with_rev
	once.
	(sched_get_condition_with_rev): Cache the results, and look them up
	if possible.
	(sched_analyze_insn): Destroy INSN_COND of previous insns if they
	are clobbered by the current insn.
	* target.def (exposed_pipline): New sched data hook.
	* doc/tm.texi.in: TARGET_SCHED_EXPOSED_PIPELINE: Add hook.
	* doc/tm.texi: Regenerate.

From-SVN: r174336
2011-05-27 14:17:36 +00:00
Richard Guenther
f90aae43b8 920711-1.x: Add -fwrapv.
2011-05-27  Richard Guenther  <rguenther@suse.de>

	* gcc.c-torture/execute/920711-1.x: Add -fwrapv.

From-SVN: r174335
2011-05-27 14:13:02 +00:00
Richard Guenther
224d42d55c 920612-1.x: Add -fwrapv.
2011-05-27  Richard Guenther  <rguenther@suse.de>

	* gcc.c-torture/execute/920612-1.x: Add -fwrapv.

From-SVN: r174334
2011-05-27 14:01:29 +00:00
Bill Schmidt
fa65a9cfed Index...
Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 174330)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2011-05-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+	PR tree-optimization/49170
+	* tree-ssa-math-opts.c (execute_cse_sincos):  Add checks for
+	sincos or cexp.
+	
 2011-05-27  Richard Guenther  <rguenther@suse.de>
 
 	PR middle-end/49189
Index: gcc/tree-ssa-math-opts.c
===================================================================
--- gcc/tree-ssa-math-opts.c	(revision 174330)
+++ gcc/tree-ssa-math-opts.c	(working copy)
@@ -1093,6 +1093,10 @@ execute_cse_sincos (void)
 		CASE_FLT_FN (BUILT_IN_COS):
 		CASE_FLT_FN (BUILT_IN_SIN):
 		CASE_FLT_FN (BUILT_IN_CEXPI):
+		  /* Make sure we have either sincos or cexp.  */
+		  if (!TARGET_HAS_SINCOS && !TARGET_C99_FUNCTIONS)
+		    break;
+
 		  arg = gimple_call_arg (stmt, 0);
 		  if (TREE_CODE (arg) == SSA_NAME)
 		    cfg_changed |= execute_cse_sincos_1 (arg);

From-SVN: r174331
2011-05-27 13:29:57 +00:00
Richard Guenther
c2299dfe53 re PR middle-end/49189 (infinite recursion in constant folder)
2011-05-27  Richard Guenther  <rguenther@suse.de>

	PR middle-end/49189
	* fold-const.c (fold_unary_loc): Do not re-fold folding conversions
	of comparisons.

	* gnat.dg/bit_packed_array5.adb: New testcase.
	* gnat.dg/bit_packed_array5.ads: Likewise.

From-SVN: r174330
2011-05-27 13:13:28 +00:00
Bernd Schmidt
a95b23b429 haifa-sched.c (sched_scan_info): Remove.
* haifa-sched.c (sched_scan_info): Remove.
	(schedule_block): Call sched_extend_luids rather than sched_init_luids
	with NULL args.
	(extend_bb, init_bb, extend_insn, init_insn, init_insns_in_bb):
	Remove functions.
	(sched_scan): Remove.
	(sched_extend_luids): Renamed from luids_extend_insn and no longer
	static.  All callers changed.
	(sched_init_insn_luid): Renamed from luids_init_insn and no longer
	static.  All callers changed.
	(sched_init_luids): Remove all arguments except the first.  All
	callers changed.  Don't use sched_scan.
	(haifa_init_h_i_d): Likewise.
	(haifa_init_insn): Call sched_extend_luids and sched_init_insn_luid
	manually rather than using sched_init_luids.  Likewise with
	extend_h_i_d, init_h_i_d and haifa_init_h_i_d.
	* sel-sched.c (sel_region_target_finish): Call sched_extend_luids
	rather than sched_init_luids with NULL args.
	* sel-sched-ir.c (new_insns): Remove variable.
	(sched_scan): New static function, previously in haifa-sched.c.  Remove
	all arguments but the first two; all callers changed.
	(sel_init_new_insn): Call sched_extend_luids and sched_init_insn_luid
	rather than sched_init_luids.
	(sel_init_bbs): Remove second argument.  All callers changed.
	(sel_add_bb): Call sched_extend_luids rather than sched_init_luids
	with NULL arguments.
	(create_insn_rtx_from_pattern): Likewise.
	* sel-sched-ir.h (sel_init_bbs): Adjust declaration.
	* sched-int.h (sched_init_luids, haifa_init_h_i_d): Likewise.
	(sched_init_insn_luid, sched_extend_luids): Declare.
	(sched_scan_info_def, sched_scan_info, sched_scan): Remove
	declarations.

From-SVN: r174327
2011-05-27 10:47:48 +00:00
Richard Biener
f8f972fc7e re PR middle-end/49177 (FAIL: gcc.dg/vect/fast-math-ifcvt-1.c)
2011-05-27  Richard Guenther  <rguenther@suse.de>

	PR middle-end/49177
	* fold-const.c (fold_unary_loc): Fold (T)(A CMP B) to
	A CMP B ? (T) true : (T) false for non-integral types T again.

From-SVN: r174326
2011-05-27 10:32:14 +00:00
Jan Hubicka
51a9ed47c9 lto-streamer-out.c (lto_string_index): break out from...; offset by 1 so 0 means NULL string.
* lto-streamer-out.c (lto_string_index): break out from...; offset by 1
	so 0 means NULL string.
	(lto_output_string_with_length): ... here.
	(lto_output_string, output_string_cst, output_identifier): Update handling
	of NULL strings.
	(lto_output_location_bitpack): New function.
	(lto_output_location): Use it.
	(lto_output_tree_ref): Use output_record_start.
	(pack_ts_type_common_value_fields): Pack aliagn & alias set in var len values.
	* lto-streamer-in.c (string_for_index): Break out from ...; offset values by 1.
	(input_string_internal): ... here; 
	(input_string_cst, input_identifier, lto_input_string): Update handling of
	NULL strings.
	(lto_input_location_bitpack): New function
	(lto_input_location): Use it.
	(unpack_ts_type_common_value_fields): Pack align & alias in var len values.
	* lto-streamer.h (bp_pack_val_len_unsigned, bp_pack_val_len_int,
	bp_unpack_val_len_unsigned, bp_unpack_val_len_int): Declare.
	(bp_pack_value): Sanity check the value range.
	* lto-section-in.c (bp_unpack_val_len_unsigned, bp_unpack_val_len_int):
	New functions.
	* lto-section-out.h (bp_pack_val_len_unsigned, bp_pack_val_len_int):
	New functions.

From-SVN: r174325
2011-05-27 09:57:40 +00:00
Hariharan Sandanagobalane
dc38fc2e8a picochip.c (reorder_var_tracking_notes): Drop call_arg_location instructions down the floor.
* config/picochip/picochip.c (reorder_var_tracking_notes): Drop
        call_arg_location instructions down the floor.

From-SVN: r174322
2011-05-27 08:27:23 +00:00
Bernd Schmidt
ad5f3d7b39 re PR bootstrap/49173 (No rule to make target ../../../../work/libgcc/../gcc/libgcc-std.ver', needed by libgcc.map'.)
PR bootstrap/49173
	* config/t-slibgcc-darwin (SHLIB_MAPFILES): Look for
	libgcc-std.ver in the build directory.
	* config/s390/t-linux (SHLIB_MAPFILES): Likewise.
	* config/sh/t-linux (SHLIB_MAPFILES): Likewise.

From-SVN: r174321
2011-05-27 07:53:51 +00:00
Jason Merrill
866e414678 re PR c++/47721 ([C++0x] Updated friendship rules?)
PR c++/47721
	* parser.c (cp_parser_member_declaration): Allow friend T.
	* friend.c (make_friend_class): Ignore non-classes.
	* pt.c (instantiate_class_template_1): Handle TEMPLATE_TYPE_PARM.

From-SVN: r174319
2011-05-27 00:04:40 -04:00
Jason Merrill
5ac537d7b4 DR 1004
DR 1004
	* pt.c (convert_template_argument): Don't complain about using
	injected-class-name as template template argument.

From-SVN: r174318
2011-05-27 00:01:56 -04:00
Jason Merrill
7c999b5781 re PR c++/47956 ([C++0x] gcc accepts static data member declaration with initializer for non-const literal type if type-specifier is auto)
PR c++/47956
	* decl.c (check_static_variable_definition): Now static.
	(cp_finish_decl): Call it here.
	(grokdeclarator): Not here.
	* pt.c (instantiate_class_template_1): Or here.
	* cp-tree.h: Don't declare it.

From-SVN: r174317
2011-05-27 00:01:46 -04:00
GCC Administrator
8fd1dd1461 Daily bump.
From-SVN: r174315
2011-05-27 00:17:38 +00:00
Janis Johnson
206a00ece1 * gcc.dg/march.c: Ignore a note for some targets.
From-SVN: r174310
2011-05-26 22:22:17 +00:00
Vladimir Makarov
574e418a27 re PR rtl-optimization/49154 (build fails on cris-elf in libgcc: ICE in setup_pressure_classes, at ira.c:902)
2011-05-26  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/49154
	* ira.c (setup_pressure_classes): Process class without sublcasses
	as a candidate for pressure classes.

From-SVN: r174309
2011-05-26 21:01:57 +00:00
Janis Johnson
1eb2a14d16 detect C++ errors to fix 2288 and 18770
detect C++ errors to fix 2288 and 18770
gcc/cp/
	PR c++/2288
	PR c++/18770
	* name-lookup.h (enum scope_kind): Add sk_cond.
	* name-lookup.c (pushdecl_maybe_friend): Get scope of shadowed local.
	Detect and report error for redeclaration from for-init or if
	or switch condition.
	(begin_scope): Handle sk_cond.
	* semantics.c (begin_if_stmt): Use sk_cond.
	(begin switch_stmt): Ditto.
gcc/testsuite/
	PR c++/2288
	PR c++/18770
	* g++.old-deja/g++.jason/cond.C: Remove xfails.
	* g++.dg/parse/pr18770.C: New test.
	* g++.dg/cpp0x/range-for5.C: Add dg-error marker.

Co-Authored-By: Nathan Froyd <froydnj@codesourcery.com>

From-SVN: r174307
2011-05-26 20:15:22 +00:00
Richard Sandiford
6a1a787e41 re PR rtl-optimization/48575 (RTL vector patterns are limited to 26 elements)
gcc/
	PR rtl-optimization/48575
	* genrecog.c (position_type): New enum.
	(position): New structure.
	(decision): Use position structure instead of a string.
	(root_pos, peep2_insn_pos_list): New variables.
	(next_position, compare_positions): New functions.
	(new_decision): Use position structures instead of strings.
	(maybe_both_true): Likewise.
	(change_state): Likewise.
	(write_tree): Likewise.
	(make_insn_sequence): Likewise.

From-SVN: r174305
2011-05-26 19:16:05 +00:00
Jason Merrill
f256f612d4 re PR c++/48211 ([C++0x] Segment Fault When Compiling)
PR c++/48211
	* name-lookup.h (cp_class_binding): Make base a pointer.
	* name-lookup.c (new_class_binding): Adjust.
	(poplevel_class): Adjust.

From-SVN: r174303
2011-05-26 14:30:13 -04:00
Paul Thomas
aed5574e7b [multiple changes]
2011-05-26  Paul Thomas  <pault@gcc.gnu.org>
	    Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/48955
	* trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
	changed to GFC_ENABLE_REVERSE.
	* trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
	to GFC_INHIBIT_REVERSE.
	* gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
	GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
	* dependency.c (gfc_dep_resolver): Change names for elements of
	gfc_reverse as necessary. Change the logic so that forward
	dependences are remembered as well as backward ones. When both
	have appeared, force a temporary.

2011-05-26  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/48955
	* gfortran.dg/dependency_40.f90 : New test.

From-SVN: r174302
2011-05-26 18:19:36 +00:00
Tobias Burnus
b8ff4e88e7 re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-05-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
        * trans-decl.c (has_coarray_vars, caf_init_block,
        gfor_fndecl_caf_register): New file-global variables.
        (gfc_finish_var_decl): Make sure that coarrays in main are static.
        (gfc_build_qualified_array): Generate coarray token variable.
        (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
        (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
        (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
        static coarrays.
        (generate_local_decl): Check for local coarrays.
        (create_main_function): SYNC ALL before calling MAIN.
        (generate_coarray_sym_init): Register static coarray.
        (generate_coarray_init): Generate CAF registering constructor
        function.
        (gfc_generate_function_code): Call it, if needed, do not create
        cgraph twice.
        (gfc_generate_module_vars, gfc_process_block_locals): Call
        generate_coarray_init.
        * trans-types.c (gfc_get_nodesc_array_type): Generate pointers
        * for
        -fcoarray=lib.
        * trans.h (gfor_fndecl_caf_register): New variable.
        (lang_type): New element caf_token.
        (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.

2011-05-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/registering_1.f90: New.

From-SVN: r174301
2011-05-26 19:41:34 +02:00
Nathan Froyd
92e948a836 make TS_BLOCK a substructure of TS_BASE
make TS_BLOCK a substructure of TS_BASE
gcc/
	* tree.c (initialize_tree_contains_struct): Mark TS_BLOCK as
	TS_BASE instead of TS_COMMON.
	(find_decls_types_r): Check for TS_TYPED structure before looking at
	TREE_TYPE.
	* tree.h (struct tree_block): Inherit from tree_base, not tree_common.
	Add chain field.
	(BLOCK_CHAIN): Use new chain field.

gcc/c-family/
	* c-common.c (warning_candidate_p): Check for BLOCKs.

gcc/java/
	* decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
	* expr.c (build_jni_stub): Likewise.

From-SVN: r174300
2011-05-26 17:38:51 +00:00
Richard Guenther
d74be31712 lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2011-05-26  Richard Guenther  <rguenther@suse.de>

	lto/
	* lto.c (uniquify_nodes): Fix bug in one of the previous changes.

From-SVN: r174296
2011-05-26 15:53:23 +00:00
Paolo Carlini
d3677132a2 list.cc: Use noexcept per the FDIS.
2011-05-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/list.cc: Use noexcept per the FDIS.
	* src/compatibility-list-2.cc: Likewise.
	* include/debug/set.h: Likewise.
	* include/debug/unordered_map: Likewise.
	* include/debug/multiset.h: Likewise.
	* include/debug/forward_list: Likewise.
	* include/debug/unordered_set: Likewise.
	* include/debug/vector: Likewise.
	* include/debug/map.h: Likewise.
	* include/debug/deque: Likewise.
	* include/debug/list: Likewise.
	* include/debug/multimap.h: Likewise.
	* include/profile/set.h: Likewise.
	* include/profile/unordered_map: Likewise.
	* include/profile/multiset.h: Likewise.
	* include/profile/forward_list: Likewise.
	* include/profile/vector: Likewise.
	* include/profile/unordered_set: Likewise.
	* include/profile/map.h: Likewise.
	* include/profile/deque: Likewise.
	* include/profile/list: Likewise.
	* include/profile/multimap.h: Likewise.
	* include/bits/hashtable.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/hashtable_policy.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/forward_list.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_tree.h: Likewise.

From-SVN: r174295
2011-05-26 15:35:02 +00:00