Commit Graph

121503 Commits

Author SHA1 Message Date
Janne Blomqvist
facb23dc4e Improve performance of byte-swapped I/O.
2013-01-23  Janne Blomqvist  <jb@gcc.gnu.org>

	* io/file_pos.c (unformatted_backspace): Use __builtin_bswapXX
	instead of reverse_memcpy.
	* io/io.h (reverse_memcpy): Remove prototype.
	* io/transfer.c (reverse_memcpy): Make static, move towards
	beginning of file.
	(bswap_array): New function.
	(unformatted_read): Use bswap_array to byte swap the data
	in-place.
	(unformatted_write): Use a larger temp buffer and bswap_array.
	(us_read): Use __builtin_bswapXX instead of reverse_memcpy.
	(write_us_marker): Likewise.

From-SVN: r195413
2013-01-23 23:56:54 +02:00
Janus Weil
ad3e2ad2ff re PR fortran/56081 (Seg fault ICE on select with bad case)
2013-01-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/56081
	* resolve.c (resolve_select): Add argument 'select_type', reject
	non-scalar expressions.
	(resolve_select_type,resolve_code): Pass new argument to
	'resolve_select'.


2013-01-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/56081
	* gfortran.dg/select_8.f90: New.

From-SVN: r195412
2013-01-23 22:38:40 +01:00
Uros Bizjak
22938102bb * ChangeLog: Add missing entry.
From-SVN: r195411
2013-01-23 20:08:45 +01:00
Uros Bizjak
be3a647f2a i386.md (*movdf_internal_rex64): Disparage alternatives involving stack registers slightly.
* config/i386/i386.md (*movdf_internal_rex64): Disparage alternatives
	involving stack registers slightly.

From-SVN: r195410
2013-01-23 20:03:35 +01:00
David Edelsohn
f6fee35fb2 rs6000.c (rs6000_delegitimize_address): Check that TOC operand is a valid symbol ref in the constant pool.
* config/rs6000/rs6000.c (rs6000_delegitimize_address): Check that
        TOC operand is a valid symbol ref in the constant pool.

From-SVN: r195409
2013-01-23 11:24:54 -05:00
Edgar E. Iglesias
c77291841c Add TARGET_OS_CPP_BUILTINS for microblaze*-linux
From-SVN: r195408
2013-01-23 15:24:52 +00:00
Georg-Johann Lay
dc62d7d151 re PR target/54222 ([avr] Implement fixed-point support)
PR target/54222
	* config/avr/stdfix.h: New file.
	* t-avr (stdfix-gcc.h): New rule to build it.
	(EXTRA_HEADERS): Set it to install stdfix.h, stdfix-gcc.h.

From-SVN: r195407
2013-01-23 15:13:51 +00:00
David Holsgrove
caa7068b90 Remove obsolete check for target_config_cflags, no longer set.
From-SVN: r195406
2013-01-23 15:12:03 +00:00
Kostya Serebryany
2660d12d0a libsanitizer merge from upstream r173241
From-SVN: r195404
2013-01-23 11:41:33 +00:00
Jakub Jelinek
b39968989d re PR fortran/56052 ([OOP] ICE in omp_add_variable, at gimplify.c:5606)
PR fortran/56052
	* trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
	and DECL_IGNORED_P on select_type_temporary and don't set
	DECL_BY_REFERENCE.

	* gfortran.dg/gomp/pr56052.f90: New test.

From-SVN: r195399
2013-01-23 09:43:50 +01:00
Jakub Jelinek
a70418fc91 re PR target/49069 (ICE in gen_cstoredi4, at config/arm/arm.md:7554)
PR target/49069
	* config/arm/arm.md (cbranchdi4, cstoredi4): Use s_register_operand
	instead of cmpdi_operand for first comparison operand.
	Don't assert that comparison operands aren't both constants.

	* gcc.dg/pr49069.c: New test.

From-SVN: r195398
2013-01-23 09:37:16 +01:00
GCC Administrator
a4bfae44d4 Daily bump.
From-SVN: r195396
2013-01-23 00:18:41 +00:00
Paolo Carlini
723889fa82 re PR c++/55944 ([C++11] static local member with constexpr c'tor causes ICE)
/cp
2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55944
	* decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
	on TARGET_EXPR nodes.

/testsuite
2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55944
	* g++.dg/cpp0x/constexpr-static10.C: New.

From-SVN: r195391
2013-01-22 23:38:34 +00:00
Uros Bizjak
c2a452151e * testsuite/ChangeLog: Move ChangeLog entries to 2013.
From-SVN: r195389
2013-01-22 23:20:37 +01:00
Jonathan Wakely
47876a2a26 install.texi (Downloading the Source): Update references to downloading separate components.
* doc/install.texi (Downloading the Source): Update references to
	downloading separate components.

From-SVN: r195388
2013-01-22 22:14:33 +00:00
Jonathan Wakely
4ebd56a55b * doc/extend.texi (__int128): Improve grammar.
From-SVN: r195387
2013-01-22 21:58:39 +00:00
Uros Bizjak
32fc5b8a4b re PR target/56028 (Splitting a 64-bit volatile store)
PR target/56028
	* config/i386/i386.md (*movti_internal_rex64): Change (o,riF)
	alternative to (o,r).
	(*movdi_internal_rex64): Remove (!o,n) alternative.
	(DImode immediate->memory splitter): Remove.
	(DImode immediate->memory peephole2): Remove.
	(movtf): Enable for TARGET_64BIT || TARGET_SSE.
	(*movtf_internal_rex64): Rename from *movtf_internal. Change (!o,F*r)
	alternative to (!o,*r).
	(*movtf_internal_sse): New pattern.
	(*movxf_internal_rex64): New pattern.
	(*movxf_internal): Disable for TARGET_64BIT.
	(*movdf_internal_rex64): Remove (!o,F) alternative.

testsuite/ChangeLog:

2012-01-22  Uros Bizjak  <ubizjak@gmail.com>

	PR target/56028
	* gcc.target/i386/pr56028.c: New test.

From-SVN: r195386
2013-01-22 21:58:37 +01:00
Jakub Jelinek
0a18c815f9 explicit-hle.cc: Tightten scan-assembler-times regexps...
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
	Tightten scan-assembler-times regexps, add dg-additional-options for
	ia32, add -g0 -fno-exceptions -fno-asynchronous-unwind-tables to
	dg-options.

From-SVN: r195383
2013-01-22 18:15:47 +01:00
Jakub Jelinek
502498d5b3 re PR middle-end/56074 (ICE compiling gcc.dg/vect/pr49093.c)
PR middle-end/56074
	* dumpfile.c (dump_loc): Only print loc if LOCATION_LOCUS (loc)
	isn't UNKNOWN_LOCATION nor BUILTINS_LOCATION.
	* tree-vect-loop-manip.c (find_loop_location): Also ignore
	stmt locations where LOCATION_LOCUS of the stmt location is
	UNKNOWN_LOCATION or BUILTINS_LOCATION.

From-SVN: r195382
2013-01-22 18:03:33 +01:00
Jakub Jelinek
3a984f1011 re PR rtl-optimization/55686 (ICE in assign_by_spills, at lra-assigns.c:1244)
PR target/55686
	* config/i386/i386.md (UNSPEC_STOS): New.
	(strset_singleop, *strsetdi_rex_1, *strsetsi_1, *strsethi_1,
	*strsetqi_1): Add UNSPEC_STOS.

	* gcc.target/i386/pr55686.c: New test.

From-SVN: r195381
2013-01-22 17:41:30 +01:00
Jason Merrill
904812578d re PR c++/56071 (friend class template cannot access private constructor in exception-specification)
PR c++/56071
	* pt.c (maybe_instantiate_noexcept): Don't defer access checks.

From-SVN: r195378
2013-01-22 11:05:04 -05:00
Paolo Carlini
fa817f7f72 re PR c++/56067 (Removal of -Wsynth from doc didn't remove example)
2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56067
	* doc/invoke.texi: Remove left over -Wsynth example.

From-SVN: r195375
2013-01-22 15:09:45 +00:00
Alan Modra
9a64728823 re PR libgomp/51376 (libgomp taskwait failure)
PR libgomp/51376
	PR libgomp/56073
	* task.c (GOMP_task): Revert 2011-12-09 change.
	(GOMP_taskwait): Likewise.  Instead use atomic load with acquire
	barrier to read task->children..
	(gomp_barrier_handle_tasks): ..and matching atomic store with
	release barrier here when setting parent->children to NULL.

From-SVN: r195370
2013-01-22 22:11:53 +10:30
Eric Botcazou
e18600419e trans.c (gnat_to_gnu): Do not translate the Etype of the node before translating the Actions.
* gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
	not translate the Etype of the node before translating the Actions.

From-SVN: r195368
2013-01-22 10:05:45 +00:00
Dodji Seketeli
b0ffaa36f0 PR c++/53609 - Wrong variadic template pack expansion in alias template
Consider this example:

     1	template<class...I> struct List {};
     2	template<int T> struct Z {static const int value = T;};
     3	template<int...T> using LZ = List<Z<T>...>;
     4
     5	template<class...U>
     6	struct F
     7	{
     8	  using N = LZ<U::value...>; //#1 This should amount to List<Z<U::value>...>
     9	}
    10
    11	F<Z<1>, Z<2> >::N A; //#2

which G++ fails to compile, with this error message:

test-PR53609-3.cc: In instantiation of 'struct F<Z<1>, Z<2> >':
test-PR53609-3.cc:11:15:   required from here
test-PR53609-3.cc:3:43: error: wrong number of template arguments (2, should be 1)
 template<int...T> using LZ = List<Z<T>...>;
                                           ^
test-PR53609-3.cc:2:24: error: provided for 'template<int T> struct Z'
 template<int T> struct Z {static const int value = T;};

I think this is because in #1, when we substitute the argument pack
{U::value...} into the pack expansion Z<T>..., tsubst_pack_expansion
yields Z<U::value...>, instead of Z<U::value>..., so the instantiation
of LZ amounts to List<Z<U::value...> >, instead of
List<Z<U::value>...>.

The idea of this patch is to make tsubst_pack_expansion support
substituting an argument pack (into a pack expansion) where one of the
arguments (let's call it the Ith argument) is itself a pack expansion
P.  In that case, the Ith element resulting from the substituting
should be a pack expansion P'.

The pattern of P' is then the pattern of P into which the pattern of
the Ith argument of the argument pack has been substituted.

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

gcc/cp/

	* pt.c (argument_pack_element_is_expansion_p)
	(make_argument_pack_select, use_pack_expansion_extra_args_p)
	(gen_elem_of_pack_expansion_instantiation): New static functions.
	(tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
	look through the possibly resulting pack expansion as well.
	(tsubst_pack_expansion): Use use_pack_expansion_extra_p to
	generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
	Use gen_elem_of_pack_expansion_instantiation to build the
	instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
	as gen_elem_of_pack_expansion_instantiation and the change in
	tsubst above generalize this particular case.
	(arg_from_parm_pack_p): Remove this for it's not used by
	tsubst_pack_expansion anymore.

gcc/testsuite/

	* g++.dg/cpp0x/variadic139.C: New test.
	* g++.dg/cpp0x/variadic140.C: Likewise.
	* g++.dg/cpp0x/variadic141.C: Likewise.

From-SVN: r195367
2013-01-22 11:05:05 +01:00
Eric Botcazou
257e81a619 trans.c (Pragma_to_gnu): Use optimize_size instead of optimize and adjust warning message.
* gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
	instead of optimize and adjust warning message.
	(Compilation_Unit_to_gnu): Process pragmas preceding the unit.

From-SVN: r195366
2013-01-22 10:01:08 +00:00
Tristan Gingold
48a24fcfc3 gigi.h (ADT_unhandled_except_decl, [...]): New.
* gcc-interface/gigi.h (ADT_unhandled_except_decl,
	ADT_unhandled_others_decl): New.
	(unhandled_others_decl, unhandled_except_decl): Define.
	* gcc-interface/trans.c: Include common/common-target.h.
	(gigi): Initialize them.
	(Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
	function in a try/catch clause.

From-SVN: r195364
2013-01-22 09:49:14 +00:00
Jakub Jelinek
7ab53cfdf6 re PR libquadmath/56072 (info page wrongly defines M_PI_2 and M_PI_4)
PR libquadmath/56072
	* libquadmath.texi (M_PI_2q, M_PI_4q): Fix up description.

From-SVN: r195360
2013-01-22 09:23:32 +01:00
Jason Merrill
dcdb8613c2 re PR c++/56059 (SIGSEGV on invalid C++11 code)
PR c++/56059
	* tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
	template args count.

From-SVN: r195355
2013-01-21 20:27:19 -05:00
GCC Administrator
d2ae47e5f6 Daily bump.
From-SVN: r195354
2013-01-22 00:18:12 +00:00
Uros Bizjak
d0be5ae58f * config/i386/i386.md (isa): Switch places of fma and fma4.
From-SVN: r195350
2013-01-21 20:45:05 +01:00
Thomas Koenig
bfc1665471 re PR fortran/55919 (Bogus warning with -J directory/)
2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/55919
	* scanner.c (add_path_to_list): Copy path to temporary and strip
	trailing directory separators before calling stat().

2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/55919
	* gfortran.dg/include_8.f90:  New test.

From-SVN: r195348
2013-01-21 19:34:49 +00:00
Uros Bizjak
62e896818a * testsuite/ChangeLog: Fix duplicate entry.
From-SVN: r195347
2013-01-21 19:54:49 +01:00
Uros Bizjak
4e913a2634 pr55579.c: Cleanup esra tree dump
* gcc.dg/tree-ssa/pr55579.c: Cleanup esra tree dump
	* gfortran.dg/unlimited_polymorphic_8.f90: Cleanup original tree dump.

From-SVN: r195346
2013-01-21 19:47:19 +01:00
Jakub Jelinek
8f498c1bdc re PR tree-optimization/56051 (Wrong expression evaluation)
PR tree-optimization/56051
	* fold-const.c (fold_binary_loc): Don't fold
	X < (cast) (1 << Y) into (X >> Y) != 0 if cast is either
	a narrowing conversion, or widening conversion from signed
	to unsigned.

	* gcc.c-torture/execute/pr56051.c: New test.

From-SVN: r195343
2013-01-21 18:55:34 +01:00
Uros Bizjak
35d59da7f7 re PR rtl-optimization/56023 ([alpha] -fcompare-debug failure due to sched1 pass)
PR rtl-optimization/56023
	* haifa-sched.c (fix_inter_tick): Do not update ticks of instructions,
	dependent on debug instruction.

testsuite/ChangeLog:

	PR rtl-optimization/56023
	* gcc.dg/pr56023.c: New test.

From-SVN: r195342
2013-01-21 18:51:23 +01:00
Martin Jambor
5b9db1bc19 re PR middle-end/56022 (ICE (segfault) at convert_memory_address_addr_space (explow.c:334))
2013-01-21  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/56022
	* function.c (allocate_struct_function): Call
	invoke_set_current_function_hook earlier.

testsuite/
	* gcc.target/i386/pr56022.c: New test.

From-SVN: r195341
2013-01-21 18:16:57 +01:00
Jason Merrill
f6c23342da * lib/target-supports.exp (check_effective_target_alias): New.
From-SVN: r195338
2013-01-21 10:49:21 -05:00
Jakub Jelinek
e8bb7d68e0 reload1.c (init_reload): Only initialize reload_obstack during the first call.
* reload1.c (init_reload): Only initialize reload_obstack
	during the first call.

From-SVN: r195335
2013-01-21 15:55:05 +01:00
Marek Polacek
616a4e32ec Fix up English grammar
From-SVN: r195334
2013-01-21 13:14:17 +00:00
Yi-Hsiu Hsu
4401981b41 marvell-pj4.md (pj4_shift_conds, [...]): Handle simple_alu_shift.
2013-01-21  Yi-Hsiu Hsu  <ahsu@marvell.com>

	* config/arm/marvell-pj4.md (pj4_shift_conds, pj4_alu_shift,
	pj4_alu_shift_conds, pj4_shift): Handle simple_alu_shift.

From-SVN: r195333
2013-01-21 10:55:15 +00:00
Ramana Radhakrishnan
8e87740bab Fix up wrong marvell-pj4.md file committed earlier and update copyright year.
2013-01-21  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/56058
	* config/arm/marvell-pj4.md: Update copyright year.
	Fix up use of alu to alu_reg and simple_alu_imm.

From-SVN: r195332
2013-01-21 10:45:05 +00:00
Uros Bizjak
1f6bc337e4 i386.md (enabled): Do not disable fma4 for TARGET_FMA.
* config/i386/i386.md (enabled): Do not disable fma4 for TARGET_FMA.

From-SVN: r195331
2013-01-21 11:33:55 +01:00
Andi Kleen
318c94c0d5 Fix PR number in ChangeLog
From-SVN: r195330
2013-01-21 01:24:10 +00:00
GCC Administrator
f4fea24afb Daily bump.
From-SVN: r195329
2013-01-21 00:19:08 +00:00
Jack Howarth
9d7302a19b re PR debug/53235 (20120504 broke -fdebug-types-section)
2013-01-20  Jack Howarth <howarth@bromo.med.uc.edu>

	    PR debug/53235
	    * g++.dg/debug/dwarf2/nested-4.C: XFAIL on darwin.

From-SVN: r195326
2013-01-20 20:35:48 +00:00
Yi-Hsiu Hsu
92607e4184 Check in missing file for:
Add support for Marvell's PJ4 CPU

2013-01-18  Yi-Hsiu Hsu  <ahsu@marvell.com>
            Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        * config/arm/marvell-pj4.md: New file.

From-SVN: r195325
2013-01-20 20:35:23 +00:00
Hans-Peter Nilsson
5a36c5b2ec * gfortran.dg/inquire_10.f90: Run only for non-newlib targets.
From-SVN: r195324
2013-01-20 19:47:35 +00:00
Vladimir Makarov
89d56d793c re PR target/55433 ([LRA] ICE on excessive reloads)
2013-01-20  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/55433
	* lra-constraints.c (curr_insn_transform): Don't reuse original
	insn for secondary memory move when memory mode should be
	different.

From-SVN: r195322
2013-01-20 19:09:58 +00:00
Andi Kleen
d76b6ea417 libstdc++: Add mem_order_hle_acquire/release to atomic.h v2
The underlying compiler supports additional __ATOMIC_HLE_ACQUIRE/RELEASE
memmodel flags for TSX, but this was not exposed to the C++ wrapper.
Handle it there.

These are additional flags, so some of assert checks need to mask
off the flags before checking the memory model type.

libstdc++-v3/:
2013-01-12  Andi Kleen  <ak@linux.intel.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

        PR libstdc++/55223
	* include/bits/atomic_base.h (__memory_order_modifier): Add
	__memory_order_mask, __memory_order_modifier_mask,
	__memory_order_hle_acquire, __memory_order_hle_release.
	(operator|,operator&): Add.
	(__cmpexch_failure_order):  Rename to __cmpexch_failure_order2.
	(__cmpexch_failure_order): Add.
	(clear, store, load, compare_exchange_weak, compare_exchange_strong):
	Handle flags.
	* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
	Add.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r195321
2013-01-20 19:03:22 +00:00