[Bug sanitizer/80404] UBSAN: compile time crash with "non-trivial conversion at assignment" error
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 12 18:09:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80404
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Apr 12 18:08:29 2017
New Revision: 246881
URL: https://gcc.gnu.org/viewcvs?rev=246881&root=gcc&view=rev
Log:
PR sanitizer/80403
PR sanitizer/80404
PR sanitizer/80405
* fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
to fold_build2_loc. Convert TREE_OPERAND (tem, 0) to type. Use
op0 instead of fold_convert_loc (loc, type, arg0).
* g++.dg/ubsan/pr80403.C: New test.
* g++.dg/ubsan/pr80404.C: New test.
* g++.dg/ubsan/pr80405.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/ubsan/pr80403.C
trunk/gcc/testsuite/g++.dg/ubsan/pr80404.C
trunk/gcc/testsuite/g++.dg/ubsan/pr80405.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list