[Bug libfortran/79612] missing space in diagnostic: Incorrect rank of return array in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79612 Dominique d'Humieres changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Dominique d'Humieres --- Closing.
[Bug libfortran/79612] missing space in diagnostic: Incorrect rank of return array in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79612 --- Comment #6 from dominiq at gcc dot gnu.org --- Author: dominiq Date: Sun Sep 24 13:47:11 2017 New Revision: 253124 URL: https://gcc.gnu.org/viewcvs?rev=253124=gcc=rev Log: +2017-09-24 Dominique d'HumieresPR libgfortran/79612 * runtime/bounds.c: Use GFC_ASSERT. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/runtime/bounds.c
[Bug libfortran/79612] missing space in diagnostic: Incorrect rank of return array in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79612 --- Comment #5 from Dominique d'Humieres --- Would something such as the following make sense (with a proper comment and the commented lines removed)? --- ../_clean/libgfortran/runtime/bounds.c 2017-01-01 17:39:08.0 +0100 +++ libgfortran/runtime/bounds.c2017-03-23 14:10:10.0 +0100 @@ -40,9 +40,10 @@ bounds_iforeach_return (array_t *retarra ret_rank = GFC_DESCRIPTOR_RANK (retarray); - if (ret_rank != 1) -runtime_error ("Incorrect rank of return array in %s intrinsic:" - "is %ld, should be 1", name, (long int) ret_rank); + GFC_ASSERT(ret_rank == 1); + /* if (ret_rank != 1) +runtime_error ("Incorrect rank of return array in %s intrinsic: " + "is %ld, should be 1", name, (long int) ret_rank); */ rank = GFC_DESCRIPTOR_RANK (array); ret_extent = GFC_DESCRIPTOR_EXTENT(retarray,0);
[Bug libfortran/79612] missing space in diagnostic: Incorrect rank of return array in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79612 --- Comment #4 from Dominique d'Humieres --- > I cannot think of this happening with normal code. An > internal error might be better, but internal_error does not > take printf-style arguments. This code has been introduced at revision r149792 (Jul 19 2009). AFAIU the above comment, the error can only trigger if the user code is miscompiled. Is this correct? If yes, should this error be suppressed or at least the message changed to something such as "Bad code: incorrect rank of return array in %s intrinsic is %ld, should be 1. Please report"? Note a duplicated 'must' in the comment /* Bounds checking for the return values of the iforeach functions (such as maxloc and minloc). The extent of ret_array must must match the rank of array. */
[Bug libfortran/79612] missing space in diagnostic: Incorrect rank of return array in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79612 --- Comment #3 from Thomas Koenig --- I cannot think of this happening with normal code. An internal error might be better, but internal_error does not take printf-style arguments.
[Bug libfortran/79612] missing space in diagnostic: Incorrect rank of return array in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79612 Dominique d'Humieres changed: What|Removed |Added CC||mikael at gcc dot gnu.org, ||tkoenig at gcc dot gnu.org --- Comment #2 from Dominique d'Humieres --- AFAICT This run time error is not covered by the test suite and I don't understand when it is triggered. Could someone help to write a test?
[Bug libfortran/79612] missing space in diagnostic: Incorrect rank of return array in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79612 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-02-22 Assignee|unassigned at gcc dot gnu.org |dominiq at lps dot ens.fr Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- > There is a space missing between "intrinsic:" and "is". Indeed!