[Bug c/115326] __builtin_sub_overflow reports incorrect overflow value

2024-06-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115326 --- Comment #4 from Jakub Jelinek --- Note, fold_builtin_arith_overflow just does tree call = build_call_expr_internal_loc (loc, ifn, ctype, 2, arg0, arg1); tree tgt = save_expr (call);

[Bug c/115326] __builtin_sub_overflow reports incorrect overflow value

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115326 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/115326] __builtin_sub_overflow reports incorrect overflow value

2024-06-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115326 --- Comment #2 from Jakub Jelinek --- I think this is just invalid testcase. The compiler is told that *a is const, but it is changed through a different lvalue.

[Bug c/115326] __builtin_sub_overflow reports incorrect overflow value

2024-06-03 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115326 Richard Biener changed: What|Removed |Added Keywords||wrong-code CC|