[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273 --- Comment #4 from Andrew Pinski --- Note ubsan can detect (correctly) a different undefined behavior since GCC 13 (since r13-4988-g8692b15ae7c05e; aka PR108256) but the undefinedness of passing 0 to ctz is still not detected and that is a dup

[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273 --- Comment #2 from Andrew Pinski --- Reduced testcase: ``` int f(int a) { return __builtin_ctz(a) == 0; } int main(void) { __builtin_printf("%d\n", f(0)); } ```

[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-05-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273 Richard Biener changed: What|Removed |Added Target Milestone|--- |12.4

[Bug sanitizer/115273] [12 Regression] passing zero to ctz() check missing

2024-05-29 Thread bic60176 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115273 --- Comment #1 from Bi6c --- Created attachment 58306 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58306=edit preprocessed file