PR target/49920
* config/i386/i386.md (strset): Do not expand strset_singleop
when %eax or $edi are fixed.
(*strsetdi_rex_1): Disable when %eax or %edi are fixed.
(*strsetsi_1): Ditto.
(*strsethi_1): Ditto.
(*strsetqi_1): Ditto.
(*rep_stosdi_rex64): Disable when %eax, %ecx or %edi are fixed.
(*rep_stossi): Ditto.
(*rep_stosqi): Ditto.
(cmpstrnsi): Also fail when %ecx is fixed.
(*cmpstrnqi_nz_1): Disable when %ecx, %esi or %edi are fixed.
(*cmpstrnqi_1): Ditto.
(*strlenqi_1): Ditto.
(*strmovdi_rex_1): Disable when %esi or %edi are fixed.
(*strmovsi_1): Ditto.
(*strmovhi_1): Ditto.
(*strmovqi_1): Ditto.
(*rep_movdi_rex64): Disable when %ecx, %esi or %edi are fixed.
(*rep_movsi): Ditto.
(*rep_movqi): Ditto.
testsuite/ChangeLog:
PR target/49920
* gcc.target/i386/pr49920.c: New test.
From-SVN: r176979
2011-07-31 Janus Weil <janus@gcc.gnu.org>
PR fortran/49112
* resolve.c (resolve_structure_cons): Don't do the full dt resolution,
only call 'resolve_fl_derived0'.
(resolve_typebound_procedures): Resolve typebound procedures of
parent type.
(resolve_fl_derived0): New function, which does a part of the work
for 'resolve_fl_derived'.
(resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
things.
2011-07-31 Janus Weil <janus@gcc.gnu.org>
PR fortran/49112
* gfortran.dg/abstract_type_6.f03: Modified.
* gfortran.dg/typebound_proc_24.f03: New.
From-SVN: r176971
2011-07-31 Tom de Vries <tom@codesourcery.com>
PR middle-end/43513
* tree-ssa-loop-ivopts.c (may_be_unaligned_p): Use max of
get_object_alignment and TYPE_ALIGN.
From-SVN: r176969
2011-07-31 Tom de Vries <tom@codesourcery.com>
PR middle-end/43513
* testsuite/libmudflap.c/fail31-frag.c: Adapt testcase to prevent
folding of alloca.
From-SVN: r176968
2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48876
* expr.c (gfc_simplify_expr): If end of a string is less
than zero, set it to zero.
2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48876
* gfortran.dg/string_5.f90: New test.
From-SVN: r176961
* config/mips/driver-native.c [__sgi__]: Include <invent.h>,
<sys/sbd.h>.
(cpu_types): New array.
(cputype): New function.
(host_detect_local_cpu): Only define buf, f if !__sgi__.
Use scaninvent instead of /proc/cpuinfo if __sgi__.
* config.host: Also use driver-native.o, mips/x-native on
mips-sgi-irix*.
* config/mips/iris6.h [__mips__] (host_detect_local_cpu):
Declare.
(EXTRA_SPEC_FUNCTIONS, MARCH_MTUNE_NATIVE_SPECS): Define.
(DRIVER_SELF_SPECS): Add MARCH_MTUNE_NATIVE_SPECS.
From-SVN: r176947
PR middle-end/49897
PR middle-end/49898
* omp-low.c (use_pointer_for_field): If disallowing copy-in/out
in nested parallel and outer is a gimple_reg, mark it as addressable
and set its bit in task_shared_vars bitmap too.
* testsuite/libgomp.c/pr49897-1.c: New test.
* testsuite/libgomp.c/pr49897-2.c: New test.
* testsuite/libgomp.c/pr49898-1.c: New test.
* testsuite/libgomp.c/pr49898-2.c: New test.
From-SVN: r176945
PR target/49313
* config/avr/libgcc.S (__ffshi2): Don't skip 2-word instruction.
(__ctzsi2): Result for 0 may be undefined.
(__ctzhi2): Result for 0 may be undefined.
(__popcounthi2): Don't clobber r30. Use __popcounthi2_tail.
(__popcountsi2): Ditto. And don't clobber r26.
(__popcountdi2): Ditto. And don't clobber r27.
* config/avr/avr.md (UNSPEC_COPYSIGN): New c_enum.
(parityhi2): New expand.
(paritysi2): New expand.
(popcounthi2): New expand.
(popcountsi2): New expand.
(clzhi2): New expand.
(clzsi2): New expand.
(ctzhi2): New expand.
(ctzsi2): New expand.
(ffshi2): New expand.
(ffssi2): New expand.
(copysignsf3): New insn.
(bswapsi2): New expand.
(*parityhi2.libgcc): New insn.
(*parityqihi2.libgcc): New insn.
(*paritysihi2.libgcc): New insn.
(*popcounthi2.libgcc): New insn.
(*popcountsi2.libgcc): New insn.
(*popcountqi2.libgcc): New insn.
(*popcountqihi2.libgcc): New insn-and-split.
(*clzhi2.libgcc): New insn.
(*clzsihi2.libgcc): New insn.
(*ctzhi2.libgcc): New insn.
(*ctzsihi2.libgcc): New insn.
(*ffshi2.libgcc): New insn.
(*ffssihi2.libgcc): New insn.
(*bswapsi2.libgcc): New insn.
From-SVN: r176920
2011-07-28 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/morestack.S (X86_64_SAVE_NEW_STACK_BOUNDARY): New.
Use X86_64_SAVE_NEW_STACK_BOUNDARY to save the new stack boundary
for x86-64. Properly check __x86_64__ and __LP64__.
From-SVN: r176912
PR rtl-optimization/49799
* combine.c (make_compound_operation): Check if the bit field is valid
before change it to bit field extraction.
* gcc.dg/pr49799.c: New test case.
From-SVN: r176911
* expr.c (expand_expr_addr_expr_1): Detect a user request for a
local frame in a naked function, and produce a suitable error for
that specific case.
From-SVN: r176904
The CLAST produced by CLooG-ISL contains an assignment and GCC chokes
on it. The exact CLAST contains an assignment followed by an if:
scat_1 = max(0,ceild(T_4-7,8));
if (scat_1 <= min(1,floord(T_4-1,8))) {
S7(scat_1);
}
This is equivalent to a loop that iterates only once, and so CLooG
generates an assignment followed by an if instead of a loop. This is
an important optimization that was improved in ISL, that allows
if-conversion: imagine GCC having to figure out that a loop like the
following actually iterates only once, and can be converted to an if:
for (scat_1 = max(0,ceild(T_4-7,8)); scat_1 <= min(1,floord(T_4-1,8)); scat_1++)
S7(scat_1);
This patch implements the translation of CLAST assignments.
Bootstrapped and tested on amd64-linux.
2011-07-28 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/48648
* graphite-clast-to-gimple.c (clast_get_body_of_loop): Handle
CLAST assignments.
(translate_clast): Same.
(translate_clast_assignment): New.
* gcc.dg/graphite/id-pr48648.c: New.
From-SVN: r176901
When setting gloog_error, graphite should continue code generation
without early returns, as otherwise the SSA representation would not
be complete. So set the new expression to integer_zero_node, that
would not require more SSA updates, and continue code generation as
nothing happened.
Regstrapped on amd64-linux.
2011-07-28 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/49876
* sese.c (rename_uses): Do not return false on gloog_error: set
the new_expr to integer_zero_node and continue code generation.
(graphite_copy_stmts_from_block): Remove early exit on gloog_error.
From-SVN: r176900
2011-07-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49813
* semantics.c (potential_constant_expression_1): Handle FMA_EXPR.
Checking this in for Paolo.
From-SVN: r176899
PR fortran/31067
* frontend-passes.c (optimize_minmaxloc): New function.
(optimize_expr): Call it.
* gfortran.dg/maxloc_2.f90: New test.
* gfortran.dg/maxloc_3.f90: New test.
* gfortran.dg/minloc_1.f90: New test.
* gfortran.dg/minloc_2.f90: New test.
* gfortran.dg/minloc_3.f90: New test.
* gfortran.dg/minmaxloc_7.f90: New test.
From-SVN: r176897