[Bug fortran/23905] New: misbehavior of function "gfc_copy_array_spec" in gcc/fortran/array.c
The function is supposed to copy expressions from "src" to "dest", however, at line 486 and 487: dest->lower[i] = gfc_copy_expr (dest->lower[i]); dest->upper[i] = gfc_copy_expr (dest->upper[i]); "dest" are misused as the arguments in the parentheses. Both of them should be "src", I think. Also, such mistyping are still in the CVS. Thank you. -- Summary: misbehavior of function "gfc_copy_array_spec" in gcc/fortran/array.c Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: skyhover at hotmail dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: *-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23905
[Bug fortran/23906] New: inappropriate branch condition in function "transform_sections" in "dependency.c"
Line 422 in the file is a if-statement: if (l_stride != NULL) mpz_cdiv_q (X2, X2, r_stride->value.integer); I am not clear about the functionality of "mpz_cdiv_q", but I think the condition should be "r_stride != NULL" by looking at its surroundings and complying to certain consistency rules. Thank you. -- Summary: inappropriate branch condition in function "transform_sections" in "dependency.c" Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: skyhover at hotmail dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23906
[Bug fortran/23907] New: missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c?
We noticed the function has no switch case for "BT_COMPLEX" by similarity check against other functions such as "gfc_simplify_range" in the same file. I think it's reasonable for a complex to have a radix. So one "case BT_COMPLEX:" may be needed just after "case BT_REAL:" at line 2513. Could you please inspect my observations? I also have similar doubts on functions "gfc_simplify_dim", "gfc_simplify_huge", "gfc_simplify_sign", and etc. Thanks a lot. -- Summary: missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c? Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: skyhover at hotmail dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23907
[Bug fortran/23907] missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c?
--- Additional Comments From skyhover at hotmail dot com 2005-09-16 05:45 --- Thanks for your information and clarification. I agree now. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23907
[Bug fortran/23905] misbehavior of function "gfc_copy_array_spec" in gcc/fortran/array.c
--- Additional Comments From skyhover at hotmail dot com 2005-09-16 05:53 --- There are some similar code in function "gfc_copy_array_ref" at line 53-55. There, "src" are kind of recursively copied into "dest". -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23905
[Bug fortran/23905] misbehavior of function "gfc_copy_array_spec" in gcc/fortran/array.c
--- Additional Comments From skyhover at hotmail dot com 2005-09-24 22:32 --- Yes, you made me clear now. "dest->lower" points to the same thing as "src- >lower" after "*dest=*src". So the loop is semantically right, creating copies of expressions pointed to by "src->lower". On the other hand, IMHO, it is a "syntax" misuse which obfuscates the meaning of the code? Thanks for your clarification. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23905