* gimple.h (block_in_transaction): Move to basic-block.h and rename.
(gimple_in_transaction): Use bb_in_transaction.
* basic-block.h (bb_in_transaction): Relocate here and rename.
* tree-ssa-loop-im.c (execute_sm): Use bb_in_transaction.
From-SVN: r204455
In this problem report, the compiler is fed a (bogus) translation unit
in which some literals contain bytes whose value is zero. The
preprocessor detects that and proceeds to emit diagnostics for that
king of bogus literals. But then when the diagnostics machinery
re-reads the input file again to display the bogus literals with a
caret, it attempts to calculate the length of each of the lines it got
using fgets. The line length calculation is done using strlen. But
that doesn't work well when the content of the line can have several
zero bytes. The result is that the read_line never sees the end of
the line because strlen repeatedly reports that the line ends before
the end-of-line character; so read_line thinks its buffer for reading
the line is too small; it thus increases the buffer, leading to a huge
memory consumption, pain and disaster.
The patch below introduces a new get_line function that returns the
next line of a file and return the length of that line even if the
line contains zero bytes. That get_line function has been adapted
from the getline function from the GNU C Library because getline being
a GNU extension it is not necessarily supported on all platforms.
read_line is then modified to return the length of the line along with
the line itself, as the line can now contain zero bytes. Callers of
read_line are adjusted consequently.
diagnostic_show_locus() is modified to consider that a line can have
characters of value zero, and so just shows a white space when
instructed to display one of these characters.
gcc/ChangeLog:
* input.h (location_get_source_line): Take an additional line_size
parameter.
* input.c (get_line): New static function definition.
(read_line): Take an additional line_length output parameter to be
set to the size of the line. Use the new get_line function do the
actual line reading.
(location_get_source_line): Take an additional output line_len
parameter. Update the use of read_line to pass it the line_len
parameter.
* diagnostic.c (adjust_line): Take an additional input parameter
for the length of the line, rather than calculating it with
strlen.
(diagnostic_show_locus): Adjust the use of
location_get_source_line and adjust_line with respect to their new
signature. While displaying a line now, do not stop at the first
null byte. Rather, display the zero byte as a space and keep
going until we reach the size of the line.
gcc/testsuite/ChangeLog:
* c-c++-common/cpp/warning-zero-in-literals-1.c: New test file.
From-SVN: r204453
* config/msp430/msp430.h (TARGET_CPU_CPP_BUILTINS): Define the
name returned by msp430_mcu_name.
(LIB_SPEC): If a -T option has not been specified then set a
default, mcu-specific, linker script.
* config/msp430/t-msp430 (MULTILIB_MATCHES): Add more mcu names.
* config/msp430/msp430.c (msp430x_names): Likewise.
Alpha sort the names for ease of comparison.
(msp430_mcu_name): New function: Returns a string suitable for
use as a C preprocessor symbol based upon the name of the MCU
being targeted.
(msp430_option_override): Accept msp430x and msp430xv2 as generic
mcu names.
* config/msp430/msp430-protos.h (msp430_mcu_name): Prototype.
From-SVN: r204447
* gcc.c (do_spec_1): Do not insert a space after a %* substitution
unless it is the last part of a spec substring.
* doc/invoke.texi (Spec Files): Document space insertion
behaviour of %*.
From-SVN: r204446
PR middle-end/58970
* expr.c (get_bit_range): Handle *offset == NULL_TREE.
(expand_assignment): If *bitpos is negative, set *offset
and adjust *bitpos, so that it is not negative.
* gcc.c-torture/compile/pr58970.c: New test.
From-SVN: r204444
2013-11-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_option_override_internal):
Remove restriction against use of VSX instructions when generating
code for little endian mode.
From-SVN: r204441
2013-11-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/altivec.md (mulv4si3): Ensure we generate vmulouh
for both big and little endian.
(mulv8hi3): Swap input operands for merge high and merge low
instructions for little endian.
From-SVN: r204440
* config/i386/sync.md (atomic_compare_and_swap<dwi>_doubleword):
If possible, add .cfi directives to record change to bx.
* config/i386/i386.c (ix86_emit_cfi): New function.
* config/i386/i386-protos.h (ix86_emit_cfi): Declare.
From-SVN: r204433
2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/58989
* check.c (gfc_check_reshape): ensure that shape is a constant
expression.
2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/58989
* gfortran.dg/reshape_6.f90: New test.
From-SVN: r204419
* Makefile.in (OBJS): Add gimple-ssa-isolate-paths.o
* common.opt (-fisolate-erroneous-paths): Add option and
documentation.
* gimple-ssa-isolate-paths.c: New file.
* gimple.c (check_loadstore): New function.
(infer_nonnull_range): Moved into gimple.c from tree-vrp.c
Verify OP is in the argument list and the argument corresponding
to OP is a pointer type. Use operand_equal_p rather than
pointer equality when testing if OP is on the nonnull list.
Use check_loadstore rather than count_ptr_derefs. Handle
GIMPLE_RETURN statements.
* tree-vrp.c (infer_nonnull_range): Remove.
* gimple.h (infer_nonnull_range): Declare.
* opts.c (default_options_table): Add
* OPT_fisolate_erroneous_paths.
* passes.def: Add pass_isolate_erroneous_paths.
* timevar.def (TV_ISOLATE_ERRONEOUS_PATHS): New timevar.
* tree-pass.h (make_pass_isolate_erroneous_paths): Declare.
* tree-ssa.c (struct count_ptr_d): Remove.
(count_ptr_derefs, count_uses_and_derefs): Remove.
* tree-ssa.h (count_uses_and_derefs): Remove.
* gcc.dg/pr38984.c: Add -fno-isolate-erroneous-paths.
* gcc.dg/tree-ssa/isolate-1.c: New test.
* gcc.dg/tree-ssa/isolate-2.c: New test.
* gcc.dg/tree-ssa/isolate-3.c: New test.
* gcc.dg/tree-ssa/isolate-4.c: New test.
From-SVN: r204414
PR rtl-optimization/58997
* loop-iv.c (iv_subreg): For IV_UNKNOWN_EXTEND, expect
get_iv_value to be in iv->mode rather than iv->extend_mode.
(iv_extend): Likewise. Otherwise, if iv->extend != extend,
use lowpart_subreg on get_iv_value before calling simplify_gen_unary.
* loop-unswitch.c (may_unswitch_on): Make sure op[i] is in the right
mode.
* gcc.c-torture/compile/pr58997.c: New test.
From-SVN: r204413
gcc/
* config/i386/i386-c.c (ix86_target_macros): Define _SOFT_FLOAT
for !TARGET_80387.
* config/i386/rtemself.h (TARGET_OS_CPP_BUILTINS): Do not define
_SOFT_FLOAT here.
(LONG_DOUBLE_TYPE_SIZE): New define.
(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Ditto.
libgcc/
* config/i386/32/sfp-machine.h (_FP_MUL_MEAT_S): Define.
(_FP_MUL_MEAT_D): Ditto.
(_FP_DIV_MEAT_S): Ditto.
(_FP_DIV_MEAT_D): Ditto.
* config.host (i[34567]86-*-rtems*): Remove i386/t-softfp, add
t-softfp-sfdf and t-softfp to tmake_file.
M gcc/config/i386/i386-c.c
M gcc/config/i386/rtemself.h
M gcc/ChangeLog
M libgcc/ChangeLog
M libgcc/config.host
M libgcc/config/i386/32/sfp-machine.h
From-SVN: r204404
2013-11-04 Balaji V. Iyer <balaji.v.iyer@intel.com>
* configure.ac: Added libcilkrts to noconfig list when C++ is not
supported.
* configure: Regenerated.
From-SVN: r204396
2013-11-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/vector.md (vec_pack_sfix_trunc_v2df): Adjust for
little endian.
(vec_pack_ufix_trunc_v2df): Likewise.
From-SVN: r204395
2013-11-05 Andrew MacLeod <amacleod@redhat.com>
* tree-outof-ssa.c (queue_phi_copy_p): Combine phi_ssa_name_p from
gimple.h and the rest of the condition in eliminate_build.
(eliminate_build): Call new routine.
* gimple.h (phi_ssa_name_p): Delete.
From-SVN: r204393
in va_heap::reserve
2013-11-05 Trevor Saunders <tsaunders@mozilla.com>
* vec.c (vec_prefix::calculate_allocation): Don't try to handle the
case of no prefix and reserving zero slots, because when that's the
case we'll never get here.
* vec.h (va_heap::reserve): Don't try and handle
vec_prefix::calculate_allocation returning zero because that should
never happen.
From-SVN: r204392
2013-11-05 Richard Biener <rguenther@suse.de>
PR middle-end/58941
* tree-dfa.c (get_ref_base_and_extent): Merge common code
in MEM_REF and TARGET_MEM_REF handling. Make sure to
process trailing array detection before diving into the
view-converted object (and possibly apply some extra offset).
* gcc.dg/torture/pr58941.c: New testcase.
From-SVN: r204391
PR tree-optimization/58984
* ipa-prop.c (ipa_load_from_parm_agg_1): Add SIZE_P argument,
set *SIZE_P if non-NULL on success.
(ipa_load_from_parm_agg, ipa_analyze_indirect_call_uses): Adjust
callers.
(ipcp_transform_function): Likewise. Punt if size of access
is different from TYPE_SIZE on v->value's type.
* gcc.c-torture/execute/pr58984.c: New test.
From-SVN: r204385