gcc/gcc/testsuite/c-c++-common
Marek Polacek 2f68e8bcc0 fold-const.c (fold_binary_loc): Don't fold if the result is undefined.
* fold-const.c (fold_binary_loc): Don't fold if the result
	is undefined.
	* match.pd (A + (-B) -> A - B, A - (-B) -> A + B,
	-(-A) -> A): Likewise.

	* c-c++-common/ubsan/overflow-sub-4.c: New test.
	* c-c++-common/ubsan/overflow-sub-2.c: Adjust dg-output.
	* c-c++-common/ubsan/overflow-int128.c: Likewise.

From-SVN: r217427
2014-11-12 14:36:41 +00:00
..
asan Avoid tail call in c-c++-common/asan/strlen-overflow-1.c 2014-11-12 04:54:00 -08:00
cilk-plus Fix some of the existing Cilk tests for the new errors. 2014-11-11 05:10:46 +00:00
cpp Enable -fextended-identifiers by default. 2014-11-05 16:19:10 +00:00
dfp
dwarf2
gomp re PR libgomp/61200 (internal compiler error: Segmentation fault, assert & openmp) 2014-10-03 09:29:42 +02:00
guality
simulate-thread
tm
torture re PR c/59708 (clang-compatible checked arithmetic builtins) 2014-11-12 13:28:06 +01:00
tsan libsanitizer merge from upstream r209283 2014-05-22 07:09:21 +00:00
ubsan fold-const.c (fold_binary_loc): Don't fold if the result is undefined. 2014-11-12 14:36:41 +00:00
Wbool-compare-1.c re PR c++/62153 (warn for bool expression compared with integer different from 0/1) 2014-08-19 18:50:00 +00:00
Wcast-qual-1.c re PR c/55383 (-Wcast-qual reports incorrect message) 2014-03-18 23:22:02 +00:00
Wconversion-real.c
Wfloat-conversion.c re PR c/53001 (-Wfloat-conversion should be available to warn about floating point errors) 2013-11-20 07:15:40 +00:00
Wint-to-pointer-cast-1.c
Wint-to-pointer-cast-2.c
Wint-to-pointer-cast-3.c
Wmemset-transposed-args1.c re PR middle-end/61294 (erroneous memset used with constant zero length parameter warning) 2014-07-14 09:36:39 +02:00
Wmemset-transposed-args2.c re PR middle-end/61294 (erroneous memset used with constant zero length parameter warning) 2014-07-14 09:36:39 +02:00
Wpointer-arith-1.c
Wsequence-point-1.c
Wshift-count-negative-1.c invoke.texi ([-Wshift-count-negative, [...]): Add. 2014-11-10 20:14:41 +00:00
Wshift-count-negative-2.c invoke.texi ([-Wshift-count-negative, [...]): Add. 2014-11-10 20:14:41 +00:00
Wshift-count-overflow-1.c invoke.texi ([-Wshift-count-negative, [...]): Add. 2014-11-10 20:14:41 +00:00
Wshift-count-overflow-2.c invoke.texi ([-Wshift-count-negative, [...]): Add. 2014-11-10 20:14:41 +00:00
Wsizeof-pointer-memaccess1.c re PR c/6940 (taking sizeof array parameter should trigger a warning) 2014-07-06 19:00:10 +00:00
Wsizeof-pointer-memaccess2.c re PR c/6940 (taking sizeof array parameter should trigger a warning) 2014-07-06 19:00:10 +00:00
Wunused-local-typedefs.c
Wunused-var-1.c
Wunused-var-2.c
Wunused-var-3.c
Wunused-var-4.c
Wunused-var-5.c
Wunused-var-6.c
Wunused-var-7.c
Wunused-var-8.c
Wunused-var-9.c
Wunused-var-10.c
Wunused-var-11.c
Wunused-var-12.c
Wunused-var-13.c
Wunused-var-14.c
Wvarargs-2.c
Wvarargs.c
addrtmp.c addrtmp.c: Add bind_pic_locally option. 2014-08-14 02:10:05 +00:00
array-lit.c
asmgoto-1.c
asmgoto-2.c
asmgoto-3.c
asmgoto-4.c
attr-used-2.c
attr-used.c
attributes-1.c re PR c/50459 (alignof doesn't work on plain old constant, works with expressions containing it) 2014-05-09 08:24:37 +00:00
attributes-2.c re PR c/50459 (alignof doesn't work on plain old constant, works with expressions containing it) 2014-05-09 08:24:37 +00:00
builtin-arith-overflow-1.c re PR c/59708 (clang-compatible checked arithmetic builtins) 2014-11-12 13:28:06 +01:00
builtin-offsetof.c
convert-vec-1.c Silence vector ABI change warnings for x86 2014-01-15 09:08:38 -08:00
cxxbitfields-3.c
cxxbitfields-6.c
fmax-errors.c
fold-bitand-4.c
fold-divmul-1.c
init-vec-1.c
int128-1.c
int128-2.c
int128-types-1.c
opaque-vector.c
pr19807-1.c re PR tree-optimization/63148 (r187042 causes auto-vectorization failure for X86 for -m32.) 2014-09-05 08:23:32 +00:00
pr20000.c
pr20318.c
pr28656.c
pr30020.c re PR c/30020 (improve diagnostics for limited range warning for a switch statement) 2014-06-04 07:26:06 +00:00
pr33193.c
pr33763.c
pr36282-1.c re PR middle-end/36282 (Spurious warning "asm declaration ignored due to conflict with previous rename") 2014-03-13 21:56:06 +01:00
pr36282-2.c re PR middle-end/36282 (Spurious warning "asm declaration ignored due to conflict with previous rename") 2014-03-13 21:56:06 +01:00
pr36282-3.c re PR middle-end/36282 (Spurious warning "asm declaration ignored due to conflict with previous rename") 2014-03-13 21:56:06 +01:00
pr36282-4.c re PR middle-end/36282 (Spurious warning "asm declaration ignored due to conflict with previous rename") 2014-03-13 21:56:06 +01:00
pr36513-2.c
pr36513.c
pr37743.c re PR c/37743 (Bogus printf format warning with __builtin_bswap32.) 2014-02-19 23:27:40 +01:00
pr41779.c
pr41935.c
pr42674.c
pr43395.c re PR c/43395 (Gcc warns label as local variable) 2014-05-01 07:29:38 +00:00
pr43690.c
pr43772.c
pr43942.c
pr44832.c
pr46562-2.c tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Rewrite to propagate the VN result into all uses where possible and to remove... 2014-06-13 10:21:40 +00:00
pr46562.c
pr48418.c
pr49706-2.c c-typeck.c (parser_build_binary_op): Don't call warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR. 2014-06-23 16:38:48 +00:00
pr49706.c re PR c/49706 (No warning for (!x > 1) which is always false) 2014-06-05 06:20:05 +00:00
pr50459-2.c pr50459.c: Move cdtor tests to a separate testcase. 2014-05-13 17:37:40 +00:00
pr50459.c pr57233.c: Add -fno-common option on hppa*-*-hpux*. 2014-08-07 17:49:08 +00:00
pr51294.c
pr51712.c
pr51768.c
pr52177.c
pr52181.c
pr53633.c
pr53874.c re PR c/61405 (Not emitting "enumeration value not handled in switch" warning for bit-field enums) 2014-09-24 17:23:56 +00:00
pr54486.c
pr54988.c
pr55619.c
pr55771.c
pr56302.c
pr56566.c
pr56607.c
pr57653-2.c re PR c/57653 (filename information discarded when using -imacros) 2014-07-24 09:00:13 +00:00
pr57653-2.h re PR c/57653 (filename information discarded when using -imacros) 2014-07-24 09:00:13 +00:00
pr57653.c re PR c/57653 (filename information discarded when using -imacros) 2014-07-24 09:00:13 +00:00
pr57653.h re PR c/57653 (filename information discarded when using -imacros) 2014-07-24 09:00:13 +00:00
pr57793.c
pr58346-1.c re PR c/58346 (ICE with SIGFPE at -O1 and above on x86_64-linux-gnu (affecting trunk, 4.8, 4.7, and 4.6)) 2014-01-23 19:18:49 +00:00
pr58346-2.c re PR c/58346 (ICE with SIGFPE at -O1 and above on x86_64-linux-gnu (affecting trunk, 4.8, 4.7, and 4.6)) 2014-01-23 19:18:49 +00:00
pr58346-3.c re PR c/58346 (ICE with SIGFPE at -O1 and above on x86_64-linux-gnu (affecting trunk, 4.8, 4.7, and 4.6)) 2014-01-23 19:18:49 +00:00
pr59032.c Handle vector increment/decrement in build_unary_op 2013-11-27 10:00:48 +00:00
pr59037.c Don't create out-of-bounds BIT_FIELD_REF. 2013-11-27 10:00:30 +00:00
pr59223.c re PR middle-end/59223 (-Wmaybe-uninitialized and -Wuninitialized relationships) 2014-02-27 08:05:21 +00:00
pr59280.c re PR c/50459 (alignof doesn't work on plain old constant, works with expressions containing it) 2014-05-09 08:24:37 +00:00
pr60101.c re PR c/60101 (Long compile times when mixed complex floating point datatypes are used in lengthy expressions) 2014-02-12 08:35:50 +01:00
pr60156.c re PR c/60156 (GCC doesn't warn about variadic main) 2014-04-25 08:22:47 +00:00
pr60226.c Fix pr60226.c on darwin. 2014-07-09 01:02:31 +00:00
pr60439.c re PR c/60439 (No warning for case overflow in switch statement.) 2014-06-03 17:35:34 +00:00
pr60689.c re PR c++/60689 (Bogus error with atomic::exchange) 2014-03-28 19:16:32 +01:00
pr61405.c re PR c/61405 (Not emitting "enumeration value not handled in switch" warning for bit-field enums) 2014-09-24 17:23:56 +00:00
pr61553.c re PR c/61553 (__atomic_store with non-pointer arg ICE) 2014-06-23 18:23:19 +00:00
pr62199-2.c re PR c++/62199 (ICE with -Wlogical-not-parentheses) 2014-08-22 19:44:27 +00:00
pr62199.c re PR c++/62199 (ICE with -Wlogical-not-parentheses) 2014-08-22 19:44:27 +00:00
raw-string-1.c
raw-string-2.c
raw-string-3.c gctest.c: Fix defaulting to int. 2014-10-06 13:48:31 +00:00
raw-string-4.c
raw-string-5.c
raw-string-6.c
raw-string-7.c
raw-string-8.c
raw-string-9.c
raw-string-10.c
raw-string-11.c
raw-string-12.c
raw-string-13.c
raw-string-14.c
raw-string-15.c
raw-string-16.c
raw-string-17.c
raw-string-18.c tree-pretty-print.c (dump_location): Make it extern. 2014-10-03 21:22:10 +00:00
raw-string-19.c tree-pretty-print.c (dump_location): Make it extern. 2014-10-03 21:22:10 +00:00
restrict-1.c
restrict-2.c
restrict-4.c
rotate-1.c IPA ICF, part 4/5 2014-10-16 10:51:55 +00:00
rotate-1a.c
rotate-2.c IPA ICF, part 4/5 2014-10-16 10:51:55 +00:00
rotate-2a.c
rotate-3.c IPA ICF, part 4/5 2014-10-16 10:51:55 +00:00
rotate-3a.c
rotate-4.c IPA ICF, part 4/5 2014-10-16 10:51:55 +00:00
rotate-4a.c
rotate-5.c
scal-to-vec1.c
scal-to-vec2.c Silence vector ABI change warnings for x86 2014-01-15 09:08:38 -08:00
sizeof-array-argument.c re PR c/6940 (taking sizeof array parameter should trigger a warning) 2014-07-06 19:00:10 +00:00
transparent-union-1.c
uninit-17.c
uninit-D-O0.c
uninit-D.c
uninit-E-O0.c
uninit-E.c
uninit-F-O0.c
uninit-F.c
uninit-G-O0.c
uninit-G.c re PR c++/60517 (warning/error for taking address of member of a temporary object) 2014-07-31 09:33:58 +00:00
uninit-pr51010.c
vector-1.c
vector-2.c
vector-3.c
vector-4.c
vector-compare-1.c
vector-compare-2.c Silence vector ABI change warnings for x86 2014-01-15 09:08:38 -08:00
vector-compare-3.c
vector-init-1.c
vector-init-2.c
vector-scalar-2.c
vector-scalar.c
vector-shift.c
vector-shift1.c
vector-shift3.c
vector-subscript-1.c
vector-subscript-2.c
vector-subscript-3.c
vla-1.c
warn-ommitted-condop.c
wdate-time.c c.opt (Wcomment): Use CPP, Var and LangEnabledBy. 2014-08-22 18:39:16 +00:00