[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 --- Comment #10 from Sebastiano Vigna --- Ahem no, my correction goes in the opposite direction it should go. I'll ask suggestions to the library authors. I really apologize for all the noise.

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 --- Comment #9 from Sebastiano Vigna --- Finally solved: the problematic statement if (h == NULL) h = (struct prb_node *)>prb_root; should just be if (h == NULL) h = tree->prb_root->prb_link[0]; The position in memory of the two pointers is

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 --- Comment #8 from Sebastiano Vigna --- I'm sorry, I did the test on the wrong file. No, you cannot eliminate the &, even if the type is correct, and h can be NULL at that point. I'll ask the libavl maintainers their opinion. We can compile

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 Sebastiano Vigna changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 --- Comment #6 from Sebastiano Vigna --- Created attachment 50410 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50410=edit Source

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 --- Comment #5 from Sebastiano Vigna --- Created attachment 50409 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50409=edit Source

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread zeccav at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 Vittorio Zecca changed: What|Removed |Added CC||zeccav at gmail dot com --- Comment #3

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 --- Comment #2 from Sebastiano Vigna --- Created attachment 50408 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50408=edit Source

[Bug c/99623] Code behaves differently at -O2 optimization

2021-03-17 Thread sebastiano.vigna at unimi dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99623 --- Comment #1 from Sebastiano Vigna --- Created attachment 50407 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50407=edit Output of gcc with -O2