Commit Graph

117181 Commits

Author SHA1 Message Date
Hans-Peter Nilsson b492210558 Fix grammo in last CL entry.
From-SVN: r187936
2012-05-28 16:05:36 +00:00
Hans-Peter Nilsson c29c10301d * doc/md.texi (Standard Names): Fix typos in documentation for atomic patterns.
From-SVN: r187935
2012-05-28 16:04:14 +00:00
Hans-Peter Nilsson e9d3ef3b2d md.texi (stack_protect_test): Remove negation of branch to label.
* doc/md.texi (stack_protect_test): Remove negation of
        branch to label.

From-SVN: r187934
2012-05-28 15:43:42 +00:00
Jakub Jelinek 512d321def re PR c++/53505 (bitfield with bool type generated broken object file)
PR tree-optimization/53505
	* c-c++-common/torture/pr53505.c: New test.

From-SVN: r187931
2012-05-28 16:28:00 +02:00
Paolo Carlini 5d497b05fe re PR c++/53503 ([C++0x] unexpected AST of kind ltgt_expr)
gcc/cp
2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53503
	* semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.

libstdc++-v3
2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53503
	* testsuite/26_numerics/headers/cmath/53503.cc: New.

From-SVN: r187928
2012-05-28 12:09:01 +00:00
GCC Administrator fa1fd5cefa Daily bump.
From-SVN: r187927
2012-05-28 00:17:55 +00:00
Nathan Sidwell 253cbc5f37 tree.c (build_constructor): Propagate TREE_SIDE_EFFECTS.
* tree.c (build_constructor): Propagate TREE_SIDE_EFFECTS.
testsuite/
	* gcc.dg/stmt-expr-4.c: New.

From-SVN: r187923
2012-05-27 16:25:58 +00:00
Janne Blomqvist 1ca8bef021 Minor timing cleanups.
2012-05-27  Janne Blomqvist  <jb@gcc.gnu.org>

	* intrinsics/time_1.h (gf_cputime): Don't reevaluate HZ expression
	for times fallback, clarify operation ordering for times and clock
	fallbacks.
	(gf_gettime): Fix comment typo.

From-SVN: r187922
2012-05-27 10:09:15 +03:00
GCC Administrator f51a04db53 Daily bump.
From-SVN: r187921
2012-05-27 00:17:50 +00:00
Paolo Carlini 982058cbc9 re PR c++/53491 (ICE in build_target_expr_with_type, at cp/tree.c:587)
/cp
2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53491
	* tree.c (stabilize_expr): Handle exp of void type.

/testsuite
2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53491
	* g++.dg/parse/crash60.C: New.

From-SVN: r187917
2012-05-26 21:20:38 +00:00
Jason Merrill 1f37c58399 re PR c++/53220 (g++ mis-compiles compound literals)
PR c++/53220
gcc/
	* c-typeck.c (array_to_pointer_conversion): Give -Wc++-compat warning
	about array compound literals.
gcc/cp/
	* call.c (convert_like_real) [ck_list]: Take array address directly.
	* typeck.c (decay_conversion): Reject decay of an array compound
	literal.

From-SVN: r187916
2012-05-26 17:13:23 -04:00
Eric Botcazou c4c57c9cbe re PR ada/50294 (ICE in output_constructor_regular_field)
PR ada/50294
	* gnat.dg/array21.adb: New test.

From-SVN: r187914
2012-05-26 13:25:55 +00:00
Eric Botcazou 9be9422751 cfgcleanup.c (try_optimize_cfg): Do not delete forwarder blocks if CLEANUP_NO_INSN_DEL.
* cfgcleanup.c (try_optimize_cfg): Do not delete forwarder blocks
	if CLEANUP_NO_INSN_DEL.
	* cfgrtl.c (unique_locus_on_edge_between_p): New function extracted
	from cfg_layout_merge_blocks.
	(emit_nop_for_unique_locus_between): New function.
	(rtl_merge_blocks): Invoke emit_nop_for_unique_locus_between.
	(cfg_layout_merge_blocks): Likewise.

From-SVN: r187913
2012-05-26 12:05:24 +00:00
Eric Botcazou 60ba49d019 * gnat.dg/renaming5.adb: Adjust dg-final directive.
From-SVN: r187912
2012-05-26 11:46:53 +00:00
Dimitrios Apostolou c5ebdc251f df-scan.c (df_def_record_1): Assert a parallel must contain an EXPR_LIST at this point.
2012-05-26  Dimitrios Apostolou  <jimis@gmx.net>
	    Paolo Bonzini  <bonzini@gnu.org>

	* df-scan.c (df_def_record_1): Assert a parallel must contain an
	EXPR_LIST at this point.  Receive the LOC and move its extraction...
	(df_defs_record): ... here. Change if-else to a switch statement.
	(df_find_hard_reg_defs, df_find_hard_reg_defs_1): New.
	(df_get_call_refs): Changed defs_generated from bitmap to HARD_REG_SET
	and compute it from df_find_hard_reg_defs(). Record DF_REF_BASE
	DEFs in REGNO order. Use HARD_REG_SET instead of bitmap for
	regs_invalidated_by_call.
	(df_insn_refs_collect): Record DF_REF_REGULAR DEFs after
	df_get_call_refs().


Co-Authored-By: Paolo Bonzini <bonzini@gnu.org>

From-SVN: r187911
2012-05-26 11:44:50 +00:00
Eric Botcazou 82ea8185b8 decl.c (variant_desc): Rename 'record' to 'new_type'.
* gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
	(build_variant_list): Adjust to above renaming.
	(gnat_to_gnu_entity) <E_Record_Subtype>: Likewise.  Give a unique name
	to the type of the variant containers.
	(create_variant_part_from): Likewise.  Give a unique name to the type
	of the variant part.

From-SVN: r187908
2012-05-26 10:42:17 +00:00
GCC Administrator 083aa7444e Daily bump.
From-SVN: r187906
2012-05-26 00:18:49 +00:00
Paolo Carlini 6d199d3c08 re PR c++/32054 (Storage classes on anonymous unions in classes)
/cp
2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/32054
	* parser.c (cp_parser_member_declaration): A storage class is not
	allowed in a declaration of an anonymous aggregate in a class scope.

/testsuite
2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/32054
	* g++.dg/other/anon-union3.C: New.

From-SVN: r187902
2012-05-25 23:40:10 +00:00
Ian Lance Taylor d4dc840de4 runtime: More efficient implementation of trampolines.
From-SVN: r187899
2012-05-25 21:51:39 +00:00
Ian Lance Taylor 40bb0243ec compiler: Don't create a closure if not needed.
From-SVN: r187897
2012-05-25 21:14:40 +00:00
Ian Lance Taylor 31a18a7e23 morestack.S (__morestack_non_split): Check whether caller is varargs and needs %bp to hold the stack frame on return.
libgcc/:
	* config/i386/morestack.S (__morestack_non_split): Check whether
	caller is varargs and needs %bp to hold the stack frame on return.
gcc/testsuite/:
	* gcc.dg/split-6.c: New test.

From-SVN: r187894
2012-05-25 20:48:19 +00:00
Eric Botcazou 37c59e691e re PR lto/52178 (Ada bootstrap failure in LTO mode)
PR lto/52178
	* tree-inline.c (remap_gimple_op_r): Fix handling of FIELD_DECL.
	* tree.c (RETURN_TRUE_IF_VAR): Do not return true for PLACEHOLDER_EXPR.

From-SVN: r187892
2012-05-25 20:26:11 +00:00
Michael Meissner 13af22d7a0 t-linux64: Delete the 32-bit multilib that uses software floating point emulation.
2012-05-25  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/t-linux64: Delete the 32-bit multilib that uses
	software floating point emulation.  No longer build the multilibs
	with -mstrict-align.

From-SVN: r187891
2012-05-25 20:00:58 +00:00
Ian Lance Taylor e5159e6070 runtime: Fix cast error in print.c on 32-bit systems.
From-SVN: r187889
2012-05-25 18:22:01 +00:00
Uros Bizjak b7d56bdfe9 re PR objc++/53441 (obj-c++.dg/ivar-invalid-type-1.mm ICE)
PR obj-c++/53441
	* decl.c (grokdeclarator): Check that current_class_type is non-NULL
	before calling constructor_name_p.

From-SVN: r187888
2012-05-25 19:29:33 +02:00
Aldy Hernandez 7be9eece4c re PR middle-end/53008 (abort in _ITM_getTMCloneSafe)
PR middle-end/53008
        * trans-mem.c (ipa_tm_create_version_alias): Output new_node if
        accessed indirectly.
        (ipa_tm_create_version): Same.

From-SVN: r187887
2012-05-25 17:14:25 +00:00
Uros Bizjak 305c089a9f * decl.c: Revert unwanted commit.
From-SVN: r187886
2012-05-25 17:09:49 +02:00
Uros Bizjak a295fa90c3 re PR target/53474 (Solaris/x86 bootstrap with Sun as broken: j.e)
PR target/53474
	* config/i386/i386.c (ix86_print_operand) <case 'O'>: Print '.' here.
	<case 'C', case 'c', case 'F', case 'f'>: Print '.' only for C and c.

From-SVN: r187885
2012-05-25 17:07:02 +02:00
Alexander Ivchenko 0ba89f9bb1 re PR target/53435 ((ix86_expand_vec_perm) and (ix86_expand_vec_perm) do not pass arguments to avx2_permvar8s[f,i] correctly)
2012-05-21  Alexander Ivchenko  <alexander.ivchenko@intel.com>

       PR target/53435
       * config/i386/i386.c (ix86_expand_vec_perm): Use correct op.
       (ix86_expand_vec_perm): Use int mode instead of float.
       (expand_vec_perm_pshufb): Remove handling of useseless type
       conversion.

From-SVN: r187881
2012-05-25 13:03:18 +00:00
H.J. Lu c7046906c3 Remove any .comment sections if the first cmp failed
PR bootstrap/53472
	* contrib/compare-debug (remove_comment): New function.
	Remove any .comment sections if the first cmp failed.

From-SVN: r187879
2012-05-25 04:47:05 -07:00
Eric Botcazou 619a69500d Fix formatting
From-SVN: r187875
2012-05-25 09:57:15 +00:00
Eric Botcazou b993039f5b re PR ada/52362 (gnat.dg/lto8.adb FAILs with gas/gld)
PR ada/52362
	* config.gcc (i[34567]86-*-mingw* | x86_64-*-mingw*): Set gas and
	gnu_ld variables to yes.
	* configure.ac (HAVE_GNU_LD): Move to after config.gcc inclusion.
	(HAVE_GNU_AS): Likewise.
	* config.in: Regenerate.
	* configure: Likewise.
ada/
	* link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
	(__gnat_using_gnu_linker): Delete.
	* gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
	Declare Object_File_Option string constant and Using_GNU_response_file
	boolean constant.
	(Process_Binder_File): ...instead of here.  Delete Using_GNU_Linker,
	Opening and Closing local variables.  Do not handle the GNU linker
	specially.
	(Write_RF): New procedure to write into the response file.  Escape some
	characters if a GNU response file is used.  Keep track of error status.
	Invoke Write_RF to write into the response file.  Delete the file only
	if the link was successful.
	* mlib-utl.adb: Do not `with' package System.
	(Gcc): Likewise.  Declare Object_File_Option string constant and
	Using_GNU_response_file boolean constant.
	(Write_RF): Take a string instead of address and length.  Escape some
	characters if a GNU response file is used.
	Invoke Write_RF to write into the response file.  Delete the file only
	if the link was successful.  Do not warn if it cannot be deleted.

From-SVN: r187874
2012-05-25 09:24:08 +00:00
Tristan Gingold 4aa820fec7 i386.c (struct ix86_frame): Remove unused frame field.
gcc/
2012-05-25  Tristan Gingold  <gingold@adacore.com>

	* config/i386/i386.c (struct ix86_frame): Remove unused frame field.
	(ix86_compute_frame_layout): Fix type of stack_alignment_needed
	and preferred_alignment.

gcc/testsuite
2012-05-25  Tristan Gingold  <gingold@adacore.com>

	* gcc.target/i386/large-frame.c: New.

From-SVN: r187873
2012-05-25 08:58:25 +00:00
Tristan Gingold d656c9c5bd ia64-common.c (ia64_except_unwind_info): Fix typo.
2012-05-25  Tristan Gingold  <gingold@adacore.com>

        * common/config/ia64/ia64-common.c (ia64_except_unwind_info): Fix typo.

From-SVN: r187872
2012-05-25 08:47:07 +00:00
Olivier Hainque c57685107c tramp.S (trampoline_setup): Use a longcall sequence in the non pic case on VxWorks.
libgcc/
        * config/rs6000/vxworks/tramp.S (trampoline_setup): Use a longcall
        sequence in the non pic case on VxWorks.

From-SVN: r187871
2012-05-25 08:20:03 +00:00
Thomas Schwinge 489381473d fold-const.c (optimize_bit_field_compare): Abort early in the strict volatile bitfields case.
gcc/
	* fold-const.c (optimize_bit_field_compare): Abort early in the strict
	volatile bitfields case.

From-SVN: r187869
2012-05-25 10:04:28 +02:00
GCC Administrator 1746f5860b Daily bump.
From-SVN: r187865
2012-05-25 00:17:44 +00:00
Ian Lance Taylor bac564c53e runtime: Make runtime.Stack actually work.
From-SVN: r187854
2012-05-24 21:07:18 +00:00
Dodji Seketeli 27c53c0cce PR bootstrap/53459 - unused local typedef when building on altivec
libcpp/

	PR bootstrap/53459
	* lex.c (search_line_fast): Remove unused typedef check_count.

From-SVN: r187853
2012-05-24 23:05:49 +02:00
Ian Lance Taylor 9e65cec2fd runtime: Correct definition of __go_file_line to match declaration.
From Rainer Orth.

From-SVN: r187851
2012-05-24 20:47:09 +00:00
Ian Lance Taylor 41f9e67527 runtime: Copy runtime_printf from other Go library.
From-SVN: r187850
2012-05-24 20:45:37 +00:00
Ian Lance Taylor 86ba147f54 runtime: Copy runtime_printf from other Go library.
From-SVN: r187848
2012-05-24 20:44:34 +00:00
Pat Haugen 6fac31b418 rs6000.c (rs6000_option_override_internal): Change rs6000_sched_costly_dep default to true_store_to_load_dep_costly.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Change
	rs6000_sched_costly_dep default to true_store_to_load_dep_costly.
	(adjacent_mem_locations): Move some code to and call...
	(get_memref_parts): ...new function.
	(mem_locations_overlap): New function.
	(rs6000_adjust_priority): Adjust calls to is_load_insn/is_store_insn.
	(is_mem_ref): Rename to...
	(find_mem_ref): ...this. Return MEM rtx.
	(get_store_dest): Remove function.
	(is_load_insn1, is_load_insn, is_store_insn1, is_store_insn): Add
	new parameter and adjust calls.
	(rs6000_is_costly_dependence): Update calls for extra arg. Make sure
	mem refs overlap for true_store_to_load_dep_costly.
	(rs6000_sched_reorder2): Update calls for extra arg. Adjust args
	passed to adjacent_mem_locations.
	(is_costly_group): Walk resolved dependency list.
	(force_new_group): Emit group ending nop for Power6/Power7.
	* config/rs6000/rs6000.md (UNSPEC_GRP_END_NOP): New enum value.
	(group_ending_nop): New define_insn.

	* gcc.target/powerpc/lhs-1.c: New.
	* gcc.target/powerpc/lhs-2.c: New.
	* gcc.target/powerpc/lhs-3.c: New.

From-SVN: r187847
2012-05-24 20:28:31 +00:00
Janne Blomqvist 44813fe043 PR 53456 CPU timing fallback using clock_gettime.
2012-05-24  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/53456
	* intrinsics/time_1.h (gf_cputime): Fallback for clock_gettime.

From-SVN: r187846
2012-05-24 23:19:37 +03:00
Dodji Seketeli 165ca58dc3 Make unwound macro expansion trace less redundant
As discussed previously, the unwinder for macro expansion is quite
verbose [1].  This patch proposes to address that shortcoming.

Consider this test case:

    $ cat -n test.c
	 1	#define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); \
	 2	 __typeof__(B) __b = (B); __a < __b ? __b : __a; })
	 3
	 4	struct mystruct {};
	 5	void
	 6	foo()
	 7	{
	 8	  struct mystruct p;
	 9	  float f = 0.0;
	10	  MYMAX (p, f);
	11	}
    $

The output of the compiler from trunk yields:

    $ cc1 -quiet ./test.c
    ./test.c: In function ‘foo’:
    ./test.c:2:31: error: invalid operands to binary < (have ‘struct mystruct’ and ‘float’)
      __typeof__(B) __b = (B); __a < __b ? __b : __a; })
				   ^
    ./test.c:2:31: note: in expansion of macro 'MYMAX'
      __typeof__(B) __b = (B); __a < __b ? __b : __a; })
				   ^
    ./test.c:10:3: note: expanded from here
       MYMAX (p, f);
       ^
    $

After this patch, the compiler yields:

    $ ./cc1 -quiet ./test.c
    ./test.c: In function ‘foo’:
    ./test.c:2:31: error: invalid operands to binary < (have ‘struct mystruct’ and ‘float’)
      __typeof__(B) __b = (B); __a < __b ? __b : __a; })
				   ^
    ./test.c:10:3: note: in expansion of macro 'MYMAX'
       MYMAX (p, f);
       ^
    $

The gotcha is, in the general case, we cannot simply eliminate the
context of the macro definition.  That is, the line from the first
output that is redundant with the first diagnostic line that has
line/column number:

    ./test.c:2:31: note: in expansion of macro 'MYMAX'
      __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                   ^

We cannot simply eliminate that context of macro definition because
there are cases where the first diagnostic that has a line/column
number doesn't point to a location inside the definition of the macro
where the relevant token is used.  For instance:

    $ cat -n test2.c
	 1	#define OPERATE(OPRD1, OPRT, OPRD2) \
	 2	  OPRD1 OPRT OPRD2;
	 3
	 4	#define SHIFTL(A,B) \
	 5	  OPERATE (A,<<,B)
	 6
	 7	#define MULT(A) \
	 8	  SHIFTL (A,1)
	 9
	10	void
	11	g ()
	12	{
	13	  MULT (1.0);// 1.0 << 1; <-- so this is an error.
	14	}
    $

Which yields without the patch:

    $ cc1 -quiet ./test2.c
    ./test2.c: In function ‘g’:
    ./test2.c:5:14: error: invalid operands to binary << (have ‘double’ and ‘int’)
       OPERATE (A,<<,B)
		  ^
    ./test2.c:2:9: note: in expansion of macro 'OPERATE'
       OPRD1 OPRT OPRD2;
	     ^
    ./test2.c:5:3: note: expanded from here
       OPERATE (A,<<,B)
       ^
    ./test2.c:5:14: note: in expansion of macro 'SHIFTL'
       OPERATE (A,<<,B)
		  ^
    ./test2.c:8:3: note: expanded from here
       SHIFTL (A,1)
       ^
    ./test2.c:8:3: note: in expansion of macro 'MULT'
       SHIFTL (A,1)
       ^
    ./test2.c:13:3: note: expanded from here
       MULT (1.0);// 1.0 << 1; <-- so this is an error.
       ^
    $

Here, the line that has the context of macro definition:

    ./test2.c:2:9: note: in expansion of macro 'OPERATE'
       OPRD1 OPRT OPRD2;
	     ^
is useful, because the first diagnostic that has line/column number
wasn't pointing into the definition of the macro OPERATE, where the
token '<<' is used.

    ./test2.c:5:14: error: invalid operands to binary << (have ‘double’ and ‘int’)
       OPERATE (A,<<,B)
		  ^
So in this this case, displaying the macro definition context is not
redundant.  I think it is even desirable.

The patch changes the output in that case to be:

    ./test2.c: In function ‘g’:
    ./test2.c:5:14: erreur: invalid operands to binary << (have ‘double’ and ‘int’)
       OPERATE (A,<<,B)
		  ^
    ./test2.c:2:9: note: in definition of macro 'OPERATE'
       OPRD1 OPRT OPRD2;
	     ^
    ./test2.c:8:3: note: in expansion of macro 'SHIFTL'
       SHIFTL (A,1)
       ^
    ./test2.c:13:3: note: in expansion of macro 'MULT'
       MULT (1.0);// 1.0 << 1; <-- so this is an error.
       ^
    $

It's shorter, but I believe it has all the information that was
present before the patch.

[1]: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00321.html

Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.

gcc/

	Make unwound macro expansion trace less redundant
	* tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Don't print
	context of macro definition in the trace, when it's redundant.
	Update comments.

gcc/testsuite/

	Make unwound macro expansion trace less redundant
	* gcc.dg/cpp/macro-exp-tracking-1.c: Adjust.
	* gcc.dg/cpp/macro-exp-tracking-2.c: Likewise.
	* gcc.dg/cpp/macro-exp-tracking-3.c: Likewise.
	* gcc.dg/cpp/macro-exp-tracking-4.c: Likewise.
	* gcc.dg/cpp/macro-exp-tracking-5.c: Likewise.
	* gcc.dg/cpp/pragma-diagnostic-2.c: Likewise.

From-SVN: r187845
2012-05-24 21:37:45 +02:00
Paolo Carlini a5dedb5e59 re PR c++/53464 (Invalid default value for non-type template parameter is accepted)
2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53464
	* g++.dg/cpp0x/constexpr-default1.C: New.

From-SVN: r187842
2012-05-24 15:12:37 +00:00
Olivier Hainque 73fb763006 Fix typo in latest ChangeLog entry addition.
From-SVN: r187840
2012-05-24 14:58:49 +00:00
Olivier Hainque 7c7c339b4b Makefile.in: move dependency on install-unwind_h from "install-leaf" to "install".
libgcc/
        * Makefile.in: move dependency on install-unwind_h from
        "install-leaf" to "install".

From-SVN: r187839
2012-05-24 14:57:11 +00:00
Olivier Hainque fdc1b7d3a7 Makefile.in (clean): Remove libgcc_tm.stamp as well.
libgcc/
        * Makefile.in (clean): Remove libgcc_tm.stamp as well.
        Use a separate command for stamp removals.

From-SVN: r187838
2012-05-24 14:51:33 +00:00
Paolo Carlini c7837f7efb re PR c++/32080 (Can goto a function try-block)
/cp
2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/32080
	* parser.c (cp_parser_ctor_initializer_opt_and_function_body,
	cp_parser_function_body): Add a bool parameter, true when parsing
	a function-try-block.
	(cp_parser_function_try_block): Pass true to the above.
	(cp_parser_function_definition_after_declarator,
	cp_parser_function_transaction): Adjust.

/testsuite
2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/32080
	* g++.dg/eh/goto2.C: New.

From-SVN: r187837
2012-05-24 14:47:06 +00:00