re PR middle-end/52478 (-ftrapv calls the wrong functions in libgcc)
authorRichard Biener <rguenther@suse.de>
Mon, 28 Jul 2014 08:47:38 +0000 (08:47 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 28 Jul 2014 08:47:38 +0000 (08:47 +0000)
commit2637bd27e86c30bce73f6753e922b1b2f03ad47d
tree50c7abb69f3b2210ca85d4268d2632528cf587c0
parent02b278a886da80a9432453993f5310cd760ca956
re PR middle-end/52478 (-ftrapv calls the wrong functions in libgcc)

2014-07-28  Richard Biener  <rguenther@suse.de>

PR middle-end/52478
* optabs.c (gen_int_libfunc): For -ftrapv libfuncs make
sure to register SImode ones, not only >= word_mode ones.
* expr.c (expand_expr_real_2): When expanding -ftrapv
binops do not use OPTAB_LIB_WIDEN.

* gcc.dg/torture/ftrapv-1.c: New testcase.

From-SVN: r213117
gcc/ChangeLog
gcc/expr.c
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/ftrapv-1.c [new file with mode: 0644]