PR c++/69922
* class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
Avoid folding it.
* init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
tests.
* cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
unless they are folded into INTEGER_CST, error_mark_node or some
comparison with NULL, avoid folding them and use either the original
comparison or non-folded comparison of folded arguments.
* cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
comparison, don't fold the comparison right away.
* g++.dg/warn/Wnonnull-compare-6.C: New test.
* g++.dg/warn/Wnonnull-compare-7.C: New test.
* g++.dg/ubsan/pr69922.C: New test.
From-SVN: r233684
PR c++/69912 - [6 regression] ICE in build_ctor_subob_ref initializing
a flexible array member
gcc/testsuite/ChangeLog:
2016-02-24 Martin Sebor <msebor@redhat.com>
PR c++/69912
* g++.dg/ext/flexary15.C: New test.
gcc/cp/ChangeLog:
2016-02-24 Martin Sebor <msebor@redhat.com>
PR c++/69912
* tree.c (build_ctor_subob_ref): Compare types' main variants
instead of the types as they are.
From-SVN: r233678
and UINT_MAX.
gcc/testsuite/ChangeLog:
* gcc/testsuite/gcc.dg/builtins-68.c: Avoid making unportable
assumptions about the relationship between SIZE_MAX and UINT_MAX.
* gcc/testsuite/g++.dg/ext/builtin_alloca.C: Same.
From-SVN: r233677
2016-02-24 Richard Biener <rguenther@suse.de>
PR middle-end/68963
* tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Fix
bogus check.
(record_nonwrapping_iv): Do not fall back to the low/high bound
for non-constant IV bases if the stmt is not always executed.
* gcc.dg/torture/pr68963.c: New testcase.
From-SVN: r233660
PR middle-end/69909
* expr.c (expand_expr_real_1) <normal_inner_ref>: Avoid
set_mem_attributes if tem is SSA_NAME which got expanded
as a MEM.
* gcc.dg/torture/pr69909.c: New test.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r233656
2016-02-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/69907
* tree-vect-stmts.c (vectorizable_load): Check for gaps at the
end of permutations for BB vectorization.
* gcc.dg/vect/bb-slp-pr69907.c: New testcase.
* gcc.dg/vect/bb-slp-34.c: XFAIL.
* gcc.dg/vect/bb-slp-pr68892.c: Likewise.
From-SVN: r233655
2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/61156
* scanner.c (add_path_to_list): If include path is not a directory,
issue a fatal error.
PR fortran/61156
* gfortran.dg/include_6.f90: Update test.
From-SVN: r233649
gcc/
* config/aarch64/aarch64.c (exynosm1_tunings): Enable fusion of AES{D,E}
and AESMC pairs.
* config/arm/exynos-m1.md: Change cost of STP, fix bypass for stores
and add bypass for AES{D,E} and AESMC pairs.
From-SVN: r233647
2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/69456
* io/list_read.c (read_real): If digit is missing from exponent issue
an error. (parse_real): Likewise and adjusted error message to clarify
it is part of a complex number.
(nml_read_obj): Bump item count and add comment that this is used to
identify which item in a namelist read has a problem.
PR libgfortran/69456
* gfortran.dg/namelist_89.f90: New test.
* gfortran.dg/pr59700.f90: Update test..
From-SVN: r233641
gcc/testsuite/ChangeLog:
PR preprocessor/69126
PR preprocessor/69543
* c-c++-common/pr69126-2-long.c: New test.
* c-c++-common/pr69126-2-short.c: New test.
* c-c++-common/pr69543-1.c: Remove xfail.
libcpp/ChangeLog:
PR preprocessor/69126
PR preprocessor/69543
* line-map.c (linemap_compare_locations): At the function top,
replace inlined bodies of get_location_from_adhoc_loc with calls
to get_location_from_adhoc_loc. Add a pair of calls to
get_location_from_adhoc_loc at the bottom of the function, to
avoid meaningless comparisons of ad-hoc and non-ad-hoc locations.
From-SVN: r233638
We had some regressions in the ability for _Pragma to disable a warning
(PR preprocessor/69126, PR preprocessor/69543, PR preprocessor/69558).
This patch attempts to add more test coverage for this, for the
various combinations of:
- various warnings:
-Wunused-variable
-Wuninitialized
-Wdeprecated-declarations
- various combinations of location of _Pragma relative to location of
the warning:
- _Pragma is in a macro, warning isn't a macro
- neither is in a macro
- _Pragma isnt't in a macro, warning is in a macro
- in different macros
- both in the same macro
- C vs C++ frontend.
It adds some XFAILs:
- pr69543-1.c for C++ (fixed in the followup patch)
- pr69543-3.c for both C and C++
- pr69543-4.c for both C and C++
- pr69558.c for C++ (moving it from gcc.dg to c-c++-common,
marking it as xfail for C++ for now)
gcc/testsuite/ChangeLog:
PR preprocessor/69126
PR preprocessor/69543
PR preprocessor/69558
* c-c++-common/pr69126.c (MACRO_1, test_1): New.
(f): Rename to...
(test_2): ...this, and add leading comment.
(MACRO_3, test_3): New.
(MACRO_4A, MACRO_4B, test_4): New.
(MACRO): Rename to...
(MACRO_5): ...this.
(g): Rename to...
(test_5): ...this, updating for renaming of MACRO, and
add leading comment.
* c-c++-common/pr69543-1.c: New.
* c-c++-common/pr69543-2.c: New.
* c-c++-common/pr69543-3.c: New.
* c-c++-common/pr69543-4.c: New.
* c-c++-common/pr69558-1.c: New.
* c-c++-common/pr69558-2.c: New.
* c-c++-common/pr69558-3.c: New.
* c-c++-common/pr69558-4.c: New.
* gcc.dg/pr69558.c: Move to...
* c-c++-common/pr69558.c: ...here. Add dg-bogus directives, with
xfail for c++.
From-SVN: r233637
2016-02-23 Richard Biener <rguenther@suse.de>
* alloc-pool.h (struct allocation_object): Make id member
conditional on CHECKING_P again.
(get_instance): Adjust.
(base_pool_allocator): Likewise.
From-SVN: r233635
DECL_SOURCE_FILE can be NULL (for example when DECL_ARTIFICIAL).
So make sure to check before comparing against main_input_filename.
gcc/ChangeLog
PR c/69911
* cgraphunit.c (check_global_declaration): Check main_input_filename
and DECL_SOURCE_FILE are not NULL.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r233627
2016-02-23 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/69666
* tree-sra.c (sra_modify_assign): Do not attempt to create
default_def replacements for unscalarizable regions.
testsuite/
* gcc.dg/tree-ssa/pr69666.c: New test.
From-SVN: r233626
gcc/testsuite/ChangeLog:
2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/67451
* gfortran.dg/coarray_allocate_5.f08: New test.
gcc/fortran/ChangeLog:
2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/67451
* trans-array.c (gfc_array_allocate): Take the attributes from the
expression to allocate and not from the source=-expression.
From-SVN: r233625