public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100910] New: Bind(c): errors handling long double complex
@ 2021-06-04 18:27 jrfsousa at gcc dot gnu.org
  2021-06-04 18:28 ` [Bug fortran/100910] " jrfsousa at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-04 18:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

            Bug ID: 100910
           Summary: Bind(c): errors handling long double complex
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jrfsousa at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50935
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50935&action=edit
Fortran code showing problem

Hi All!

Errors handling kind due to kind not being realted to elem_len.

Seen on:

GNU Fortran (GCC) 10.3.1 20210526
GNU Fortran (GCC) 11.1.1 20210526
GNU Fortran (GCC) 12.0.0 20210529 (experimental)

Thank you very much.

Best regards.
José Rui

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/100910] Bind(c): errors handling long double complex
  2021-06-04 18:27 [Bug fortran/100910] New: Bind(c): errors handling long double complex jrfsousa at gcc dot gnu.org
@ 2021-06-04 18:28 ` jrfsousa at gcc dot gnu.org
  2021-06-05 12:19 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-04 18:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

--- Comment #1 from José Rui Faustino de Sousa <jrfsousa at gcc dot gnu.org> ---
Created attachment 50936
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50936&action=edit
C code for bind(c)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/100910] Bind(c): errors handling long double complex
  2021-06-04 18:27 [Bug fortran/100910] New: Bind(c): errors handling long double complex jrfsousa at gcc dot gnu.org
  2021-06-04 18:28 ` [Bug fortran/100910] " jrfsousa at gcc dot gnu.org
@ 2021-06-05 12:19 ` dominiq at lps dot ens.fr
  2021-06-06  0:44 ` jrfsousa at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-06-05 12:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2021-06-05
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
On my system I get

% gfc pr100910.f90 pr100910.c
pr100910.c: In function 'c_vrfy_long_double_complex':
c_vrfy_long_double_complex':
pr100910.c:49:43: warning: implicit declaration of function 'CMPLX'
[-Wimplicit-function-declaration]
   49 |     if ((cabsl (*ip-(long double complex)(CMPLX((double)(i+1),
(double)(2*(i+1)))))>(long double)0.0))
      |                                           ^~~~~
Undefined symbols for architecture x86_64:
  "_CMPLX", referenced from:
      _c_vrfy_long_double_complex in ccyI5oZ3.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/100910] Bind(c): errors handling long double complex
  2021-06-04 18:27 [Bug fortran/100910] New: Bind(c): errors handling long double complex jrfsousa at gcc dot gnu.org
  2021-06-04 18:28 ` [Bug fortran/100910] " jrfsousa at gcc dot gnu.org
  2021-06-05 12:19 ` dominiq at lps dot ens.fr
@ 2021-06-06  0:44 ` jrfsousa at gcc dot gnu.org
  2021-06-06  0:45 ` jrfsousa at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-06  0:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

--- Comment #3 from José Rui Faustino de Sousa <jrfsousa at gcc dot gnu.org> ---
AFAIK the "CMPLX" macros are part of C11 and should be defined in the standard
header "complex.h"...

Since there are no complains about the header, maybe just adding the definition
of the macro will do the trick...

#define CMPLXL(x, y) ((long double complex)((long double)(x) + I * (long
double)(y)))

I will attach an altered file.

Thank you very much.

Best regards,
José Rui

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/100910] Bind(c): errors handling long double complex
  2021-06-04 18:27 [Bug fortran/100910] New: Bind(c): errors handling long double complex jrfsousa at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-06-06  0:44 ` jrfsousa at gcc dot gnu.org
@ 2021-06-06  0:45 ` jrfsousa at gcc dot gnu.org
  2021-06-18 11:00 ` dominiq at lps dot ens.fr
  2021-10-22  3:06 ` sandra at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-06  0:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

--- Comment #4 from José Rui Faustino de Sousa <jrfsousa at gcc dot gnu.org> ---
Created attachment 50955
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50955&action=edit
Missing macros

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/100910] Bind(c): errors handling long double complex
  2021-06-04 18:27 [Bug fortran/100910] New: Bind(c): errors handling long double complex jrfsousa at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-06-06  0:45 ` jrfsousa at gcc dot gnu.org
@ 2021-06-18 11:00 ` dominiq at lps dot ens.fr
  2021-10-22  3:06 ` sandra at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-06-18 11:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/100910] Bind(c): errors handling long double complex
  2021-06-04 18:27 [Bug fortran/100910] New: Bind(c): errors handling long double complex jrfsousa at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-06-18 11:00 ` dominiq at lps dot ens.fr
@ 2021-10-22  3:06 ` sandra at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-10-22  3:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

sandra at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |sandra at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #5 from sandra at gcc dot gnu.org ---
This is fixed now.  There is adequate test coverage in the c-interop testsuite;
typecodes-array-longdouble.f90 and typecodes-scalar-longdouble.f90.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-22  3:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 18:27 [Bug fortran/100910] New: Bind(c): errors handling long double complex jrfsousa at gcc dot gnu.org
2021-06-04 18:28 ` [Bug fortran/100910] " jrfsousa at gcc dot gnu.org
2021-06-05 12:19 ` dominiq at lps dot ens.fr
2021-06-06  0:44 ` jrfsousa at gcc dot gnu.org
2021-06-06  0:45 ` jrfsousa at gcc dot gnu.org
2021-06-18 11:00 ` dominiq at lps dot ens.fr
2021-10-22  3:06 ` sandra at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).