[Bug fortran/109861] Optimization is marking uninitialized C_PTR being passed to a C function, causes segfault.

2023-05-16 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109861 Scot Breitenfeld changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug fortran/109861] Optimization is marking uninitialized C_PTR being passed to a C function, causes segfault.

2023-05-16 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109861 --- Comment #6 from Scot Breitenfeld --- Thanks for the standard reference. That is indeed what I was looking for. I understand now that, in this case, the INTENT refers to whether C_PTR can be changed and does not relate to the INTENT state of

[Bug fortran/99982] INTERFACE selects wrong module procedure involving C_PTR and C_FUNPTR

2023-05-16 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99982 --- Comment #11 from Scot Breitenfeld --- Thanks for the standard reference. That is indeed what I was looking for. I understand now that, in this case, the INTENT refers to whether C_PTR can be changed and does not relate to the INTENT state of

[Bug fortran/109861] Optimization is marking uninitialized C_PTR being passed to a C function, causes segfault.

2023-05-15 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109861 --- Comment #3 from Scot Breitenfeld --- I see the same issue with NAG, regardless of the optimization level. Our CI testing had missed it because this was a parallel test, and we don't test parallel with NAG. I guess the issue is whether

[Bug fortran/109861] New: Optimization is marking uninitialized C_PTR being passed to a C function, causes segfault.

2023-05-15 Thread brtnfld at hdfgroup dot org via Gcc-bugs
Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: brtnfld at hdfgroup dot org Target Milestone: --- Created attachment 55085 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55085=edit Fortra

[Bug fortran/99982] INTERFACE selects wrong module procedure involving C_PTR and C_FUNPTR

2023-04-12 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99982 --- Comment #9 from Scot Breitenfeld --- This is Great! Thank-you.

[Bug fortran/99982] INTERFACE selects wrong module procedure involving C_PTR and C_FUNPTR

2023-03-22 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99982 --- Comment #5 from Scot Breitenfeld --- I removed the c_funptr interface in CGNS since it was not being used.

[Bug fortran/99982] INTERFACE selects wrong module procedure involving C_PTR and C_FUNPTR

2023-03-22 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99982 --- Comment #4 from Scot Breitenfeld --- Is there an update on this issue, the CGNS fortran wrappers will not work with gfortran as there are no work arounds for this issue. Thanks.

[Bug fortran/100149] Seg fault passing to CHARACTER(*), DIMENSION(*), INTENT(IN), OPTIONAL

2021-04-21 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100149 Scot Breitenfeld changed: What|Removed |Added Known to work||10.3.0

[Bug fortran/100149] Seg fault passing to CHARACTER(*), DIMENSION(*), INTENT(IN), OPTIONAL

2021-04-20 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100149 --- Comment #2 from Scot Breitenfeld --- Thanks for the update; it is good to know that it was fixed in 11.0. I also tried it with GCC master (4.20.2021), and it worked. This is for an open-source library (CGNS), and it is a commonly used API;

[Bug fortran/99982] INTERFACE selects wrong module procedure involving C_PTR and C_FUNPTR

2021-04-20 Thread brtnfld at hdfgroup dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99982 --- Comment #1 from Scot Breitenfeld --- I checked with gcc master (4/20/2021), and it still has the same issue.

[Bug fortran/100149] New: Seg fault passing to CHARACTER(*), DIMENSION(*), INTENT(IN), OPTIONAL

2021-04-19 Thread brtnfld at hdfgroup dot org via Gcc-bugs
: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: brtnfld at hdfgroup dot org Target Milestone: --- Created attachment 50631 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50631=edit The program has two lines of do

[Bug fortran/99982] New: INTERFACE selects wrong module procedure involving C_PTR and C_FUNPTR

2021-04-08 Thread brtnfld at hdfgroup dot org via Gcc-bugs
Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: brtnfld at hdfgroup dot org Target Milestone: --- Created attachment 50532 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50532=edit program uses interface and mod

[Bug fortran/66973] New: Incorrect resolution of generic interface with TYPE(C_PTR)

2015-07-22 Thread brtnfld at hdfgroup dot org
Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: brtnfld at hdfgroup dot org Target Milestone: --- Created attachment 36035 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36035action=edit H5Tff.F90 -- contains the module

[Bug fortran/66973] Incorrect resolution of generic interface with TYPE(C_PTR)

2015-07-22 Thread brtnfld at hdfgroup dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66973 --- Comment #4 from Scot Breitenfeld brtnfld at hdfgroup dot org --- The work around is instead to do: PROGRAM main USE H5T IMPLICIT NONE REAL, TARGET :: val TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(val) CALL pickone(f_ptr) END PROGRAM

[Bug fortran/66973] Incorrect resolution of generic interface with TYPE(C_PTR)

2015-07-22 Thread brtnfld at hdfgroup dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66973 --- Comment #1 from Scot Breitenfeld brtnfld at hdfgroup dot org --- Created attachment 36036 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36036action=edit fortranlib_test_F03, main program

[Bug fortran/66973] Incorrect resolution of generic interface with TYPE(C_PTR)

2015-07-22 Thread brtnfld at hdfgroup dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66973 --- Comment #2 from Scot Breitenfeld brtnfld at hdfgroup dot org --- The following sequence picks the f90 interface, when it should pick the f03 (TYPE(C_PTR)) interface. gfortran -c H5Tff.F90 gfortran fortranlib_test_F03.f90 -o H5Tff.o

[Bug fortran/66973] Incorrect resolution of generic interface with TYPE(C_PTR)

2015-07-22 Thread brtnfld at hdfgroup dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66973 --- Comment #3 from Scot Breitenfeld brtnfld at hdfgroup dot org --- (In reply to Scot Breitenfeld from comment #2) The following sequence picks the f90 interface, when it should pick the f03 (TYPE(C_PTR)) interface. gfortran -c H5Tff.F90

[Bug fortran/66973] Incorrect resolution of generic interface with TYPE(C_PTR)

2015-07-22 Thread brtnfld at hdfgroup dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66973 --- Comment #6 from Scot Breitenfeld brtnfld at hdfgroup dot org --- it also works if you add USE ISO_C_BINDING to the main program: PROGRAM main USE ISO_C_BINDING USE H5T IMPLICIT NONE REAL, TARGET :: val CALL pickone(C_LOC(val)) END

[Bug fortran/55891] Problem with shared library and EQUIVALENCE on darwin 11.4.2 x86_64

2013-02-05 Thread brtnfld at hdfgroup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55891 Scot Breitenfeld brtnfld at hdfgroup dot org changed: What|Removed |Added Status|UNCONFIRMED

[Bug fortran/55891] New: Problem with shared library and EQUIVALENCE on darwin 11.4.2 x86_64

2013-01-06 Thread brtnfld at hdfgroup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55891 Bug #: 55891 Summary: Problem with shared library and EQUIVALENCE on darwin 11.4.2 x86_64 Classification: Unclassified Product: gcc Version: 4.6.2 Status:

[Bug fortran/48404] SELECTED_REAL_KIND is returning KIND=16 when not available

2011-04-05 Thread brtnfld at hdfgroup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404 --- Comment #7 from Scot Breitenfeld brtnfld at hdfgroup dot org 2011-04-05 18:46:26 UTC --- (In reply to comment #3) Thus: How have you obtained the compiler? Are you sure that the correct compiler/library combination is used? One compiler

[Bug fortran/48404] SELECTED_REAL_KIND is returning KIND=16 when not available

2011-04-05 Thread brtnfld at hdfgroup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404 Scot Breitenfeld brtnfld at hdfgroup dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug fortran/48404] New: SELECTED_REAL_KIND is returning KIND=16 when not available

2011-04-01 Thread brtnfld at hdfgroup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404 Summary: SELECTED_REAL_KIND is returning KIND=16 when not available Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug fortran/48404] SELECTED_REAL_KIND is returning KIND=16 when not available

2011-04-01 Thread brtnfld at hdfgroup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404 --- Comment #2 from Scot Breitenfeld brtnfld at hdfgroup dot org 2011-04-01 19:46:54 UTC --- (In reply to comment #1) Works OK for me on 4.5 on Fedora 14. Please try compiling your test program with -static and run the test and report here

[Bug fortran/45211] C interoperable error when compiling BIND(C) function in a module.

2010-08-09 Thread brtnfld at hdfgroup dot org
--- Comment #2 from brtnfld at hdfgroup dot org 2010-08-09 15:02 --- If the type declaration is moved to the module scope the code compiles. MODULE liter_cb_mod USE ISO_C_BINDING TYPE, BIND(C) :: MYFTYPE INTEGER(C_INT) :: I, J REAL(C_FLOAT) :: S END TYPE MYFTYPE CONTAINS

[Bug fortran/45211] New: C interoperable error when compiling BIND(C) function in a module.

2010-08-06 Thread brtnfld at hdfgroup dot org
Severity: critical Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brtnfld at hdfgroup dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45211

[Bug fortran/38536] ICE with C_LOC in resolve.c due to not properly going through expr-ref

2010-05-03 Thread brtnfld at hdfgroup dot org
--- Comment #11 from brtnfld at hdfgroup dot org 2010-05-03 14:50 --- (In reply to comment #10) Can this be closed? Is there something left to do here? As of gfortran 4.4.4 (and 4.5.1) the program in comment #7 does not compile but gives the same error: Error: CHARACTER argument

[Bug fortran/38536] ICE with C_LOC in resolve.c due to not properly going through expr-ref

2008-12-31 Thread brtnfld at hdfgroup dot org
--- Comment #7 from brtnfld at hdfgroup dot org 2008-12-31 15:36 --- Additional failure: SUBROUTINE test(buf, buf2) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE CHARACTER(LEN=*), INTENT(INOUT), TARGET :: buf CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(1:2), TARGET :: buf2

[Bug fortran/36771] Non-Standard addition for C_LOC and character strings

2008-12-15 Thread brtnfld at hdfgroup dot org
--- Comment #4 from brtnfld at hdfgroup dot org 2008-12-15 16:52 --- In any case: I tried ifort, g95, NAG f95, gfortran, and sunf95 - of these only ifort allows it (even with all checking enabled - thus presumably only by accident and not on purpose). Thus I wonder whether

[Bug fortran/38171] New: equivalence and nested modules broken

2008-11-18 Thread brtnfld at hdfgroup dot org
Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brtnfld at hdfgroup dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38171

[Bug fortran/37498] New: Incorrect array value returned

2008-09-12 Thread brtnfld at hdfgroup dot org
Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brtnfld at hdfgroup dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37498

[Bug fortran/37498] Incorrect array value returned

2008-09-12 Thread brtnfld at hdfgroup dot org
--- Comment #5 from brtnfld at hdfgroup dot org 2008-09-12 19:38 --- (In reply to comment #3) This may be due to an incompatibility between the 4.3 and 4.4 libraries. What result do you get when you compile with -static, to make sure that you get the right library? That fixed

[Bug fortran/36771] Non-Standard addition for C_LOC and character strings

2008-07-14 Thread brtnfld at hdfgroup dot org
--- Comment #1 from brtnfld at hdfgroup dot org 2008-07-14 20:45 --- For the simple program, PROGRAM main USE ISO_C_BINDING CHARACTER(LEN=2, KIND=C_CHAR), TARGET :: chr TYPE(C_PTR) :: chr_ptr chr_ptr = C_LOC(chr) END PROGRAM main the work around is to: CHARACTER(LEN=1, KIND

[Bug fortran/36759] C_LOC and characters greater then one in length.

2008-07-09 Thread brtnfld at hdfgroup dot org
--- Comment #5 from brtnfld at hdfgroup dot org 2008-07-09 14:24 --- The behavior conforms to the standard: For the C_LOC(X) function X must be interpretable and interpretable for a character the standard says: 15.2.1 Interoperability of intrinsic types A Fortran intrinsic 4 type

[Bug fortran/36771] New: Non-Standard addition for C_LOC and character strings

2008-07-09 Thread brtnfld at hdfgroup dot org
: 4.4.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brtnfld at hdfgroup dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36771

[Bug fortran/36759] C_LOC and characters greater then one in length.

2008-07-08 Thread brtnfld at hdfgroup dot org
--- Comment #2 from brtnfld at hdfgroup dot org 2008-07-08 17:43 --- Subject: Re: C_LOC and characters greater then one in length. My mistake, I did not see that in the standard. It still would be nice however to have the non-standard feature for characters of LEN 1. burnus

[Bug fortran/36759] C_LOC and characters greater then one in length.

2008-07-08 Thread brtnfld at hdfgroup dot org
--- Comment #4 from brtnfld at hdfgroup dot org 2008-07-08 18:40 --- Subject: Re: C_LOC and characters greater then one in length. I reported it to intel , their flag (-e03) used for checking for non-standard Fortran 2003 features missed it. pgi compiler with -Mstandard also missed

[Bug fortran/36759] New: C_LOC and characters greater then one in length.

2008-07-07 Thread brtnfld at hdfgroup dot org
greater then one in length. Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brtnfld at hdfgroup dot org http