Commit Graph

120837 Commits

Author SHA1 Message Date
Jakub Jelinek 1fe04fdc32 asan.c (instrument_derefs): Handle bitfield COMPONENT_REFs accesses as reads/writes to their...
* asan.c (instrument_derefs): Handle bitfield COMPONENT_REFs
	accesses as reads/writes to their DECL_BIT_FIELD_REPRESENTATIVE.

From-SVN: r194344
2012-12-10 08:44:18 +01:00
GCC Administrator cf8d35faee Daily bump.
From-SVN: r194342
2012-12-10 00:19:28 +00:00
John David Anglin a12e166c6d gcov-12.c: Fix dg order.
* gcc.misc-tests/gcov-12.c: Fix dg order.

From-SVN: r194338
2012-12-09 18:27:21 +00:00
John David Anglin 8e15182f33 re PR middle-end/54470 (FAIL: gcc.dg/ipa/iinline-4.c scan-ipa-dump inline "hooray4[^\\n]*inline copy in test4")
PR middle-end/54470
	* gcc.dg/ipa/iinline-4.c: xfail hooray4 test on 32-bit hppa*-*-*.

From-SVN: r194337
2012-12-09 18:24:27 +00:00
John David Anglin bbcfbc634b pr47917.c: Change "dg-xfail-if" to "dg-xfail-run-if" for *-*-hpux10*.
* gcc.dg/torture/pr47917.c: Change "dg-xfail-if" to "dg-xfail-run-if"
	for *-*-hpux10*.

From-SVN: r194335
2012-12-09 18:21:35 +00:00
Uros Bizjak 2fcfba3d65 re PR target/55344 (Cross compiling for alpha-linux fails because <signal.h> doesn't exist)
PR target/55344
	* config/alpha/linux-unwind.h: Disable when inhibit_libc is defined.

From-SVN: r194334
2012-12-09 19:15:59 +01:00
John David Anglin e4139a8dd1 20030711-1.c: Define MAP_FAILED if not defined.
* gcc.dg/20030711-1.c: Define MAP_FAILED if not defined.
	* gcc.dg/20050826-1.c: Likewise.

From-SVN: r194333
2012-12-09 17:41:09 +00:00
Tobias Burnus c5c1aeb2f2 trans-array.c (gfc_deallocate_scalar_with_status): Use NULL_TREE in the call to gfc_deallocate_scalar_with_status.
2012-12-09  Tobias Burnus  <burnus@net-b.de>

        * trans-array.c (gfc_deallocate_scalar_with_status): Use
        NULL_TREE in the call to gfc_deallocate_scalar_with_status.
        * trans-decl.c (gfc_trans_deferred_vars): Pass symbol.
        * trans-stmt.c (gfc_trans_deallocate): Pass polymorphic
        * variable.

From-SVN: r194332
2012-12-09 16:29:32 +01:00
Eric Botcazou 2608ca66e1 vect9.adb: Add -w to dg-options.
* gnat.dg/vect9.adb: Add -w to dg-options.
	* gnat.dg/vect10.adb: Likewise.

From-SVN: r194331
2012-12-09 14:43:34 +00:00
Andreas Schwab 9ddad47136 libstdc++.exp (dg-test): Unset testname_with_flags after running the test.
* testsuite/lib/libstdc++.exp (dg-test): Unset testname_with_flags
after running the test.

From-SVN: r194330
2012-12-09 14:31:27 +00:00
Thomas Koenig da52ef4376 re PR fortran/55593 (Bogus error on passing DO LOOP variable)
2012-12-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/55593
	* frontend-passes.c (doloop_code):  Use resolved_sym
	instead of n.sym->formal for formal argument list
	to get the correct version for all generic subroutines.

2012-12-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/55593
	* gfortran.dg/do_check_8.f90:  New test.

From-SVN: r194329
2012-12-09 09:15:36 +00:00
GCC Administrator 5f515aaecb Daily bump.
From-SVN: r194328
2012-12-09 00:18:36 +00:00
Eric Botcazou 3d4b05fb68 Fix typo
From-SVN: r194325
2012-12-08 18:07:14 +00:00
Eric Botcazou acd3f1c2d4 lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of variables in the global contant pool.
* lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of
	variables in the global contant pool.

From-SVN: r194324
2012-12-08 15:53:39 +00:00
Eric Botcazou 54441a34e7 trans.c (gnat_to_gnu): Assert that the type of the prefix is ultimately an array.
* gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Assert
	that the type of the prefix is ultimately an array.

From-SVN: r194323
2012-12-08 12:13:44 +00:00
Steven Bosscher 28ea163c41 re PR rtl-optimization/55158 (segfault in schedule_region at -O3)
PR rtl-optimization/55158
	* sched-rgn.c (bb_state_array, bb_state): Add some explaining
	comment, and initialize to NULL explicitly.
	(realloc_bb_state_array): New function.
	(free_bb_state_array): New function.
	(schedule_region): Call realloc_bb_state_array after schedule_block.
	(sched_rgn_init): Use realloc_bb_state_array to initialize bb_state.
	(sched_rgn_finish): Use free_bb_state_array to free it.

From-SVN: r194322
2012-12-08 12:12:50 +00:00
Eric Botcazou 54625ca121 trans.c (Subprogram_Body_to_gnu): Be prepared for a by-ref VAR_DECL in the case of an Out parameter passed by copy.
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Be prepared for a
	by-ref VAR_DECL in the case of an Out parameter passed by copy.

From-SVN: r194321
2012-12-08 11:57:15 +00:00
Eric Botcazou a2ce7808e4 * tree-ssa-loop-im.c (for_each_index) <CONST_DECL>: New case.
From-SVN: r194320
2012-12-08 11:44:05 +00:00
Jason Merrill cf3c30d31f re PR c++/55127 (Incorrect "dependent scope" error with partial specialization of non-type parameter)
PR c++/55127
	* search.c (accessible_in_template_p): New.
	* cp-tree.h: Declare it.
	* pt.c (instantiation_dependent_scope_ref_p): New.
	(value_dependent_expression_p): Use it.
	(instantiation_dependent_r): Likewise.
	* semantics.c (finish_decltype_type): Handle SCOPE_REF.

From-SVN: r194318
2012-12-07 22:31:37 -05:00
Jason Merrill 4eaee921fa re PR c++/55419 (ICE in gimplify_init_ctor_preeval, at gimplify.c:3587)
PR c++/55419
	* tree.c (build_target_expr): Don't set TREE_CONSTANT.

From-SVN: r194317
2012-12-07 22:31:25 -05:00
Aldy Hernandez 3da2b176b3 re PR c++/55513 (Incorrect snprintf folding when building with -std=c++0x)
PR c++/55513
	* semantics.c (cxx_eval_builtin_function_call): Set non_constant_p
	after folding.

From-SVN: r194316
2012-12-08 01:19:13 +00:00
GCC Administrator cea55d343c Daily bump.
From-SVN: r194315
2012-12-08 00:20:49 +00:00
Paolo Carlini 094484e72e tree.c (build_aggr_init_expr): Remove tsubst_flags_t parameter.
2012-12-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* tree.c (build_aggr_init_expr): Remove tsubst_flags_t parameter.
	(build_cplus_new): Adjust.
	* cp-tree.h: Adjust declaration.
	* init.c (build_value_init): Adjust.

From-SVN: r194312
2012-12-07 23:17:14 +00:00
Sriraman Tallam 6757fd34bc toplev.c (process_options): Do not warn when -ffunction-sections and -fprofile are used together.
2012-12-07  Sriraman Tallan  <tmsriram@google.com>

	* toplev.c (process_options): Do not warn when -ffunction-sections
	and -fprofile are used together.

From-SVN: r194311
2012-12-07 22:46:35 +00:00
Steven Bosscher 8a1239acfc * ree.c (struct ext_cand): Remove GTY markers.
From-SVN: r194310
2012-12-07 22:29:01 +00:00
Mike Stump 9b1baeef25 discr38.adb: Don't use ^M line endings.
2012-12-07  Mike Stump  <mikestump@comcast.net>

	    * gnat.dg/discr38.adb: Don't use ^M line endings.
	    gnat.dg/loop_optimization13.adb: Likewise.
	    gnat.dg/loop_optimization13.ads: Likewise.
	    gnat.dg/discr36_pkg.adb: Likewise.
	    gnat.dg/discr36_pkg.ads: Likewise.
	    gnat.dg/loop_optimization11_pkg.ads: Likewise.
	    gnat.dg/discr36.ads: Likewise.
	    gnat.dg/loop_optimization11.adb: Likewise.

From-SVN: r194309
2012-12-07 21:26:20 +00:00
Vladimir Makarov 9011b0f6b7 re PR rtl-optimization/55141 (wrong code with -fno-split-wide-types)
2012-12-07  Vladimir Makarov  <vmakarov@redhat.com>

	testsuite/gcc.target/i386/pr55141.c
	* lra-constraints.c (lra_constraints): Use biggest mode for
	df_set_regs_ever_live.

2012-12-07  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/55141
	* gcc.target/i386/pr55141.c: New.

From-SVN: r194308
2012-12-07 21:06:38 +00:00
Dodji Seketeli 62defc56c5 PR c++/54401 - Confusing diagnostics about type-alias at class scope
Consider this invalid example given in the PR, where T is not defined:

     1	template<typename>
     2	struct X {
     3	    using type = T;
     4	};

g++ yields the confusing diagnostics:

test.cc:3:10: error: expected nested-name-specifier before 'type'
    using type = T;
          ^
test.cc:3:10: error: using-declaration for non-member at class scope
test.cc:3:15: error: expected ';' before '=' token
    using type = T;
               ^
test.cc:3:15: error: expected unqualified-id before '=' token

I think this is because in cp_parser_member_declaration we tentatively
parse an alias declaration; we then have a somewhat meaningful
diagnostic which alas is not emitted because we are parsing
tentatively.  As the parsing didn't succeed (because the input is
invalid) we try to parse a using declaration, which fails as well; but
then the diagnostic emitted is the one for the failed attempt at
parsing a using declaration, not an alias declaration.  Oops.

The idea of this patch is to commit the tentative parse when we see
the '=' token in the alias-declaration.  That way any error encounter
after that token is reported to the user.

We are now getting the following output:

    test.cc:3:18: erreur: expected type-specifier before ‘T’
	 using type = T;
		      ^
    test.cc:3:18: erreur: ‘T’ does not name a type

I don't really like the "before 'T'" there, but I think we maybe could
revisit the format of what cp_parser_error emits in general, now that
we have caret diagnostics;  We could maybe do away with the "before T"
altogether?

In the mean time, it seems to me that this patch brings an improvement
over what we already have in trunk, and the issue above could be
addressed separately.

Tested on x86_64-unknown-linux-gnu against trunk.

gcc/cp/

	* parser.c (cp_parser_alias_declaration): Commit to tentative
	parse when see the '=' token.  Get out if the type-id is invalid.
	Update function comment.
	(cp_parser_member_declaration): Don't try to parse a using
	declaration if we know that we expected an alias declaration; that
	is, if we see the '=' token after the identifier.

gcc/testsuite/

	* g++.dg/cpp0x/alias-decl-28.C: New test.
	* g++.dg/cpp0x/alias-decl-16.C: Update.

From-SVN: r194306
2012-12-07 18:05:19 +01:00
Jan Hubicka 0588ac84f7 tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add UPPER_BOUND parameter.
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add UPPER_BOUND
 	parameter.
 	(try_unroll_loop_completely) Update.

From-SVN: r194305
2012-12-07 17:02:20 +00:00
Jakub Jelinek 0bd0d3bc95 re PR fortran/55395 (libgfortran bootstrap failure on powerpc-linux-gnu and arm-linux-gnueabi)
PR fortran/55395
	* varpool.c (varpool_remove_node): Don't drop DECL_INITIAL
	for -g for any kind of debug info.

From-SVN: r194304
2012-12-07 17:04:26 +01:00
Jakub Jelinek a58dfde08d re PR bootstrap/54926 (Bootstrap comparison failure for various files in libbacktrace)
PR bootstrap/54926
	* Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
	* Makefile.in: Regenerated.

From-SVN: r194303
2012-12-07 15:14:25 +01:00
Richard Biener 2b91f098af re PR tree-optimization/54886 (FAIL: gcc.dg/graphite/pr(42521|42771).c (internal compiler error) due to revision 192219)
2012-12-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/54886
	* graphite-sese-to-poly.c (build_loop_iteration_domains): Properly
	free all memory.

From-SVN: r194302
2012-12-07 13:16:28 +00:00
Martin Jambor d250540a66 re PR middle-end/55078 (FAIL: g++.dg/torture/pr46154.C)
2012-12-07  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/55078
	* ipa-inline-transform.c (inline_call): Turn #if 0 to #ifdef
	ENABLE_CHECKING.
	* ipa-prop.c (try_make_edge_direct_simple_call): Use
	ipa_value_from_jfunc.
	(try_make_edge_direct_virtual_call): Likewise.
	(update_indirect_edges_after_inlining): Lookup new_root_info and pass
	it to the functions above.

From-SVN: r194301
2012-12-07 14:05:52 +01:00
Martin Jambor 4bd7b70b89 re PR tree-optimization/55590 (SRA still produces unnecessarily unaligned memory accesses)
2012-12-07  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/55590
	* tree-sra.c (build_ref_for_offset): Use get_object_alignment_1 to
	get base alignment.

	* testsuite/gcc.target/i386/pr55590-1.c: New test.
	* testsuite/gcc.target/i386/pr55590-2.c: Likewise.

From-SVN: r194300
2012-12-07 13:50:43 +01:00
Uros Bizjak a09b3c50dd * config/i386/i386.c (legitimize_tls_address): Reorganize a tiny bit.
From-SVN: r194299
2012-12-07 12:02:37 +01:00
Paolo Carlini 6fe61543c7 re PR c++/54975 (cv-qualifiers of typedef-name are ignored in lambda expression)
2012-12-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54975
	* g++.dg/cpp0x/lambda/lambda-typedef.C: New.

From-SVN: r194297
2012-12-07 09:53:04 +00:00
Jason Merrill 0ed4ab44f6 re PR c++/54325 (C++11 uniform initialization syntax for argument-less abstract base class constructor fails)
PR c++/54325
	* tree.c (build_aggr_init_expr): Don't check for abstract class.

From-SVN: r194284
2012-12-06 23:54:27 -05:00
Jason Merrill c7dd75fb5c add PR 55245 marker
From-SVN: r194283
2012-12-06 23:54:12 -05:00
Jason Merrill 3e243cfced re PR c++/55058 (Unexpected invalid type conversion error)
PR c++/55058
	* pt.c (tsubst): Keep the quals when looking through a typedef.

From-SVN: r194282
2012-12-06 23:53:59 -05:00
Jason Merrill 01290963d1 re PR c++/55249 (Multiple copy constructors for template class lead to link errors)
PR c++/55249
	* tree.c (build_vec_init_elt): Use the type of the initializer.

From-SVN: r194281
2012-12-06 23:53:46 -05:00
GCC Administrator 2c340383f0 Daily bump.
From-SVN: r194278
2012-12-07 00:18:45 +00:00
Uros Bizjak 5858fcd997 re PR middle-end/55597 (internal compiler error: in plus_constant, at explow.c:88)
PR target/55597
	* config/i386/i386.c (legitimize_tls_address): Zero-extend x to Pmode,
	before using it as insn or call equivalent.

testsuite/ChangeLog:

	PR target/55597
	* gcc.target/i386/pr55597.c: New test.

From-SVN: r194274
2012-12-06 23:05:21 +01:00
Peter Bergner 957fee09af configure.tgt: Enable build on powerpc*-linux.
libsanitizer/
	* configure.tgt: Enable build on powerpc*-linux.

gcc/
	* config/rs6000/sysv4.h (TARGET_ASAN_SHADOW_OFFSET): Define.
	* config/rs6000/rs6000.c (rs6000_asan_shadow_offset): New function.
	* config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Disable if using ASAN.

From-SVN: r194273
2012-12-06 15:53:36 -06:00
Jakub Jelinek 789b6d0559 re PR fortran/55395 (libgfortran bootstrap failure on powerpc-linux-gnu and arm-linux-gnueabi)
PR fortran/55395
	* varpool.c (varpool_remove_node): Don't drop DECL_INITIAL
	if -g and emitting DWARF2+.

From-SVN: r194272
2012-12-06 21:34:55 +01:00
Pat Haugen 6c64e50fc8 rs6000.c (rs6000_option_override_internal): Set default loop peeling limits.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
	default loop peeling limits.

From-SVN: r194271
2012-12-06 20:32:37 +00:00
Jason Merrill 5cd5a78c9b re PR c++/54744 (internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer)
PR c++/54744
	* pt.c (resolve_typename_type): Check TYPENAME_IS_RESOLVING_P on scope.
	* init.c (expand_member_init): Check for being in a template first.
	* parser.c (cp_parser_mem_initializer_list): Only check class types
	for equivalence to the current class.

From-SVN: r194267
2012-12-06 15:21:08 -05:00
Jason Merrill 1e8671f733 re PR c++/54913 (qualified lookup in ctor of class template fails to find static member of reference type)
PR c++/54913
	* semantics.c (finish_qualified_id_expr): convert_from_reference
	after building a SCOPE_REF.

From-SVN: r194266
2012-12-06 15:20:52 -05:00
Jason Merrill 0fe4913b32 re PR c++/55032 (Internal compiler error: in strip_typedefs, at cp/tree.c:1199)
PR c++/55032
	* tree.c (build_array_type_1): Re-layout if we found it in the
	hash table.

From-SVN: r194265
2012-12-06 15:20:34 -05:00
Jakub Jelinek 84fd832c03 re PR c++/54207 ([C++0x] ICE in build_noexcept_spec when bool is #defined/typedef'd)
PR c++/54207
	* except.c (build_noexcept_spec): Avoid direct comparison
	with boolean_true_node or boolean_false_node, instead use
	operand_equal_p and/or INTEGER_CST check.
	* pt.c (tsubst_exception_specification): Likewise.
	* typeck2.c (merge_exception_specifiers): Likewise.

	* g++.dg/cpp0x/noexcept18.C: New test.

From-SVN: r194263
2012-12-06 19:55:48 +01:00
Jakub Jelinek 947f720f7d re PR c++/55573 (ICE in adjust_temp_type, at cp/semantics.c:6454)
PR c++/55573
	* semantics.c (adjust_temp_type): Handle VECTOR_CST.

	* g++.dg/cpp0x/constexpr-55573.C: New test.

From-SVN: r194262
2012-12-06 19:54:25 +01:00