[Bug libfortran/112364] calloc used incorrectly

2024-04-16 Thread peter0x44 at disroot dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 Peter Damianov changed: What|Removed |Added CC||peter0x44 at disroot dot org ---

[Bug libfortran/112364] calloc used incorrectly

2023-11-06 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 Tobias Burnus changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug libfortran/112364] calloc used incorrectly

2023-11-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #12 from CVS Commits --- The master branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:17df6ddcf11aef6d200305d35641a7deb2f430e1 commit r14-5148-g17df6ddcf11aef6d200305d35641a7deb2f430e1 Author: Tobias Burnus Date:

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #11 from Martin Uecker --- This is one possible way to read it. But as written, I think one can easily understand it the other way, because calloc never mentions requested total size but only about space for an array of objects of

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 kargl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #10 from joseph at codesourcery dot com --- The wording refers to "the size requested", which I consider to be the product of two arguments in the case of calloc - not a particular argument to calloc.

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #9 from Martin Uecker --- (In reply to jos...@codesourcery.com from comment #7) > I believe "size requested" refers to the product nmemb * size in the case > of calloc, so getting the arguments the "wrong" way round does not affect

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org ---

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #7 from joseph at codesourcery dot com --- I believe "size requested" refers to the product nmemb * size in the case of calloc, so getting the arguments the "wrong" way round does not affect the required alignment. The point of

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #6 from Martin Uecker --- For reference, this is were the revised wording in C comes. This is intentional. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2293.htm

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #5 from Xi Ruoyao --- (In reply to Martin Uecker from comment #4) > Interesting. But independently of alignment, the description of calloc makes > it clear that it allocates an array of nmemb objects of size x. So in any > case I

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #4 from Martin Uecker --- Interesting. But independently of alignment, the description of calloc makes it clear that it allocates an array of nmemb objects of size x. So in any case I think the code should be changed accordingly,

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #3 from Xi Ruoyao --- (In reply to Martin Uecker from comment #2) > I don't think this is correct. The requirement is "The pointer returned if > the allocation succeeds is suitably aligned so that it may be assigned to a > pointer

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #2 from Martin Uecker --- I don't think this is correct. The requirement is "The pointer returned if the allocation succeeds is suitably aligned so that it may be assigned to a pointer to any type of object with a fundamental

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 Xi Ruoyao changed: What|Removed |Added CC||xry111 at gcc dot gnu.org