[Bug fortran/100245] ICE on automatic reallocation

2022-09-01 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100245

--- Comment #4 from José Rui Faustino de Sousa  ---
On 01/09/22 19:30, anlauf at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100245
> 

Hi Anlauf,

Sorry for the very late answer, but at the moment I am far too busy to 
even look into it.

Do as you see fit, it is fine by me.

Best regards,
José Rui

> anlauf at gcc dot gnu.org changed:
> 
> What|Removed |Added
> 
>   CC||anlauf at gcc dot gnu.org
> 
> --- Comment #3 from anlauf at gcc dot gnu.org ---
> Jose, your patch looks fine, but unfortunately was never reviewed.
> Do you plan to ping it, or shall I take care of it?
>

[Bug fortran/100683] Array initialization refuses valid

2021-06-17 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

José Rui Faustino de Sousa  changed:

   What|Removed |Added

  Attachment #51010|0   |1
is obsolete||

--- Comment #11 from José Rui Faustino de Sousa  
---
Created attachment 51032
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51032=edit
Updated patch.

[Bug fortran/100683] Array initialization refuses valid

2021-06-17 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

--- Comment #10 from José Rui Faustino de Sousa  
---
Second and hopefully last update...

https://gcc.gnu.org/pipermail/fortran/2021-June/056170.html

[Bug fortran/94048] ICE and other problems using rank intrinsic to set array size

2021-06-16 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94048

José Rui Faustino de Sousa  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from José Rui Faustino de Sousa  ---
Fixed by PR96726

[Bug fortran/82376] Duplicate function call using -fcheck=pointer

2021-06-15 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82376

José Rui Faustino de Sousa  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from José Rui Faustino de Sousa  ---
Fixed on mainline for gcc-12, 11-branch and 10-branch.

Best regards,
José Rui

[Bug fortran/97046] Bad interaction between lbound/ubound, allocatable arrays and bind(C) subroutine with dimension(..) parameter

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97046

--- Comment #9 from José Rui Faustino de Sousa  ---
Created attachment 51018
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51018=edit
Updated patch.

[Bug fortran/97046] Bad interaction between lbound/ubound, allocatable arrays and bind(C) subroutine with dimension(..) parameter

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97046

--- Comment #8 from José Rui Faustino de Sousa  ---
Updated patch:

https://gcc.gnu.org/pipermail/fortran/2021-June/056163.html

[Bug fortran/94331] Bind(C) corrupts array descriptors

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94331

--- Comment #13 from José Rui Faustino de Sousa  
---
Created attachment 51017
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51017=edit
Updated patch.

[Bug fortran/94327] Bind(c) argument attributes are incorrectly set

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94327

--- Comment #6 from José Rui Faustino de Sousa  ---
Created attachment 51016
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51016=edit
Updated patch.

[Bug fortran/94327] Bind(c) argument attributes are incorrectly set

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94327

--- Comment #5 from José Rui Faustino de Sousa  ---
Updated patch:

https://gcc.gnu.org/pipermail/fortran/2021-June/056163.html

[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963

--- Comment #7 from José Rui Faustino de Sousa  ---
Created attachment 51015
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51015=edit
Updated patch.

[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963

--- Comment #6 from José Rui Faustino de Sousa  ---
Updated patch:

https://gcc.gnu.org/pipermail/fortran/2021-June/056163.html

[Bug fortran/93308] bind(c) subroutine changes lower bound of array argument in caller

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93308

--- Comment #7 from José Rui Faustino de Sousa  ---
Created attachment 51014
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51014=edit
Updated patch.

[Bug fortran/93308] bind(c) subroutine changes lower bound of array argument in caller

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93308

--- Comment #6 from José Rui Faustino de Sousa  ---
Updated patch:

https://gcc.gnu.org/pipermail/fortran/2021-June/056163.html

[Bug fortran/94331] Bind(C) corrupts array descriptors

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94331

--- Comment #12 from José Rui Faustino de Sousa  
---
Updated patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056163.html

[Bug fortran/94104] Request for diagnostic improvement

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94104

José Rui Faustino de Sousa  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/94104] Request for diagnostic improvement

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94104

--- Comment #3 from José Rui Faustino de Sousa  ---
Created attachment 51013
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51013=edit
Error message improvement

[Bug fortran/94104] Request for diagnostic improvement

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94104

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056162.html

[Bug fortran/100683] Array initialization refuses valid

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

--- Comment #9 from José Rui Faustino de Sousa  ---
Created attachment 51010
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51010=edit
Patch and changelog

[Bug fortran/100683] Array initialization refuses valid

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

--- Comment #8 from José Rui Faustino de Sousa  ---
Corrected patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056160.html

[Bug fortran/100683] Array initialization refuses valid

2021-06-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

--- Comment #7 from José Rui Faustino de Sousa  ---
I was using pr87993.f90 from the testsuite... ;-)

The fix is simple enough:

diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index a37ad66..a9518e7 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -7138,8 +7138,10 @@ gfc_resolve_expr (gfc_expr *e)
   /* Also try to expand a constructor.  */
   if (t)
{
+ gfc_simplify_expr(e, 1);
  gfc_expression_rank (e);
- if (gfc_is_constant_expr (e) || gfc_is_expandable_expr (e))
+ if (e->expr_type == EXPR_ARRAY
+ && (gfc_is_constant_expr (e) || gfc_is_expandable_expr (e)))
gfc_expand_constructor (e, false);
}

I really should have though of this possibility...

Thank you very much.

Best regards,
José Rui

[Bug fortran/100948] [12 Regression] ICE in gfc_conv_expr_val, at fortran/trans-expr.c:9069

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100948

--- Comment #6 from José Rui Faustino de Sousa  ---
Created attachment 51002
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51002=edit
Patch and changelog

[Bug fortran/100948] [12 Regression] ICE in gfc_conv_expr_val, at fortran/trans-expr.c:9069

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100948

--- Comment #5 from José Rui Faustino de Sousa  ---
Partial patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056155.html

[Bug fortran/100906] Bind(c): failure handling character with len/=1

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906

--- Comment #3 from José Rui Faustino de Sousa  ---
Created attachment 51001
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51001=edit
Patch and changelog

[Bug fortran/100906] Bind(c): failure handling character with len/=1

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html

[Bug fortran/100907] Bind(c): failure handling wide character

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100907

--- Comment #7 from José Rui Faustino de Sousa  ---
Created attachment 51000
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51000=edit
Patch and changelog

[Bug fortran/100911] Bind(c): failure handling C_PTR

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100911

--- Comment #3 from José Rui Faustino de Sousa  ---
Created attachment 50999
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50999=edit
Patch and changelog

[Bug fortran/100911] Bind(c): failure handling C_PTR

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100911

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html

[Bug fortran/100914] Bind(c): errors handling complex

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100914

--- Comment #6 from José Rui Faustino de Sousa  ---
Created attachment 50998
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50998=edit
Patch and changelog

[Bug fortran/100914] Bind(c): errors handling complex

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100914

--- Comment #5 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html

[Bug fortran/100915] Bind(c): failure handling C_FUNPTR

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100915

--- Comment #3 from José Rui Faustino de Sousa  ---
Created attachment 50997
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50997=edit
Patch and changelog

[Bug fortran/100915] Bind(c): failure handling C_FUNPTR

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100915

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html

[Bug fortran/100916] Bind(c): CFI_type_other unimplemented.

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100916

--- Comment #3 from José Rui Faustino de Sousa  ---
Created attachment 50996
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50996=edit
Patch and changelog

[Bug fortran/100916] Bind(c): CFI_type_other unimplemented.

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100916

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html

[Bug fortran/100917] Bind(c): errors handling long double real

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100917

--- Comment #3 from José Rui Faustino de Sousa  ---
Please ignore patch wrong PR...

Sorry for the inconvenience.

Best regards,
José Rui

[Bug fortran/100917] Bind(c): errors handling long double real

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100917

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html

[Bug fortran/101047] Pointer explicit initialization fails

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101047

--- Comment #2 from José Rui Faustino de Sousa  ---
Created attachment 50994
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50994=edit
Patch and changelog

[Bug fortran/101047] Pointer explicit initialization fails

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101047

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056152.html

[Bug fortran/101048] Class pointer explicit initialization refuses valid

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101048

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-June/056152.html

[Bug fortran/101048] Class pointer explicit initialization refuses valid

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101048

--- Comment #1 from José Rui Faustino de Sousa  ---
Created attachment 50993
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50993=edit
Patch and changelog

[Bug fortran/101048] New: Class pointer explicit initialization refuses valid

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101048

Bug ID: 101048
   Summary: Class pointer explicit initialization refuses valid
   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 50992
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50992=edit
Fortran code showing problem

Hi All!

Class pointer explicit initialization refused with bogus error.

Seen on:

GNU Fortran (GCC) 9.4.1 20210605
GNU Fortran (GCC) 10.3.1 20210605
GNU Fortran (GCC) 11.1.1 20210605
GNU Fortran (GCC) 12.0.0 20210612 (experimental)

Thank you very much.

Best regards,
José Rui

[Bug fortran/101047] New: Pointer explicit initialization fails

2021-06-13 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101047

Bug ID: 101047
   Summary: Pointer explicit initialization fails
   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 50991
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50991=edit
Fortran code showing problem

Hi all!

Pointer explicit initialization does not seem to work at all.

Seen on:

GNU Fortran (GCC) 9.4.1 20210605
GNU Fortran (GCC) 10.3.1 20210605
GNU Fortran (GCC) 11.1.1 20210605
GNU Fortran (GCC) 12.0.0 20210612 (experimental)

Thank you very much.

Best regards,
José Rui

[Bug fortran/100683] Array initialization refuses valid

2021-06-12 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

--- Comment #5 from José Rui Faustino de Sousa  ---
I am having trouble reproducing this.

Can you provide some more detail on your setup?

Best regards,
José Rui

[Bug fortran/100948] [12 Regression] ICE in gfc_conv_expr_val, at fortran/trans-expr.c:9069

2021-06-11 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100948

--- Comment #4 from José Rui Faustino de Sousa  ---
I am looking into this.

I think I already have a patch for the ICE, but there are further problems
which I am trying to solve.

Best regards,
José Rui

[Bug fortran/100907] Bind(c): failure handling wide character

2021-06-06 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100907

--- Comment #6 from José Rui Faustino de Sousa  ---
> Shouldn't the C11 standard headers be provide by GCC12?
> 

AFAIK gcc uses the system's libc. In Linux the default will be GNU libc "glibc"
in Mas OS the default libc will be BSD libc which is missing some of the
headers... Or so it says in GNU portability library "gnulib" documentation...

Thank you very much.

Best regards,
José Rui

[Bug fortran/100914] Bind(c): errors handling complex

2021-06-05 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100914

--- Comment #4 from José Rui Faustino de Sousa  ---
Created attachment 50956
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50956=edit
Missing macros

[Bug fortran/100914] Bind(c): errors handling complex

2021-06-05 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100914

--- Comment #3 from José Rui Faustino de Sousa  ---
This is the same problem as in PR100910.

I will attach an updated file.

Thank you very much.

Best regards,
José Rui

[Bug fortran/100910] Bind(c): errors handling long double complex

2021-06-05 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

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

[Bug fortran/100910] Bind(c): errors handling long double complex

2021-06-05 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

--- Comment #3 from José Rui Faustino de Sousa  ---
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

[Bug fortran/100907] Bind(c): failure handling wide character

2021-06-05 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100907

--- Comment #4 from José Rui Faustino de Sousa  ---
Created attachment 50954
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50954=edit
Mac OS support

[Bug fortran/100907] Bind(c): failure handling wide character

2021-06-05 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100907

--- Comment #3 from José Rui Faustino de Sousa  ---
It seems that Mac OS doesn't have the full set of C11 standard headers... :-(

It should work using "stdint.h" and typedef(ing) char32_t to uint32_t.

If that doesn't work either one could try "unsigned int".

I will attach an updated file, with the altered file.

I have no access to Mac OS, so I cannot test it.

Thank you very much.

Best regards,
José Rui

[Bug fortran/100917] Bind(c): errors handling long double real

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100917

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

[Bug fortran/100917] New: Bind(c): errors handling long double real

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100917

Bug ID: 100917
   Summary: Bind(c): errors handling long double real
   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 50945
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50945=edit
Fortran code showing problem

Hi All!

Wrong type and kind on handling long double real. Since kind is not related to
elem_len there seems to be no way to infer it.

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

[Bug fortran/100916] Bind(c): CFI_type_other unimplemented.

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100916

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

[Bug fortran/100916] New: Bind(c): CFI_type_other unimplemented.

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100916

Bug ID: 100916
   Summary: Bind(c): CFI_type_other unimplemented.
   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 50943
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50943=edit
Fortran code showing problem

Hi All!

As per standard non C interoperability types get CFI_type_other.

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

[Bug fortran/100915] Bind(c): failure handling C_FUNPTR

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100915

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

[Bug fortran/100915] New: Bind(c): failure handling C_FUNPTR

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100915

Bug ID: 100915
   Summary: Bind(c): failure handling C_FUNPTR
   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 50941
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50941=edit
Fortran code showing problem

Hi All!

Wrong type, kind and elem_len confuses CFI_address.

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

[Bug fortran/100914] Bind(c): errors handling complex

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100914

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

[Bug fortran/100914] New: Bind(c): errors handling complex

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100914

Bug ID: 100914
   Summary: Bind(c): errors handling 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 50939
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50939=edit
Fortran code showing problem

Hi All!

Wrong type and kind with complex intrinsic type, causing failure at
CFI_Address.

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

[Bug fortran/100911] Bind(c): failure handling C_PTR

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100911

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

[Bug fortran/100911] New: Bind(c): failure handling C_PTR

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100911

Bug ID: 100911
   Summary: Bind(c): failure handling C_PTR
   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 50937
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50937=edit
Fortran code showing problem

Hi All!

Wrong type and kind and crash due to division by zero (elem_len==0)

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

[Bug fortran/100910] Bind(c): errors handling long double complex

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910

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

[Bug fortran/100910] New: Bind(c): errors handling long double complex

2021-06-04 Thread jrfsousa at gcc dot gnu.org via 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=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

[Bug fortran/100907] Bind(c): failure handling wide character

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100907

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

[Bug fortran/100907] New: Bind(c): failure handling wide character

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100907

Bug ID: 100907
   Summary: Bind(c): failure handling wide character
   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 50931
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50931=edit
Fortran code showing problem

Hi All!

Fails in too many different ways... Should work at least as CFI_type_other...

Seen on:

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

Thank you very much.

Best regards,
José Rui

[Bug fortran/100906] Bind(c): failure handling character with len/=1

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906

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

[Bug fortran/100906] New: Bind(c): failure handling character with len/=1

2021-06-04 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906

Bug ID: 100906
   Summary: Bind(c): failure handling character with len/=1
   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 50929
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50929=edit
Fortran code showing problem

Hi All!

Failures (mostly mixing kind with len) on handling character with length
greater than 1.

Seen on:

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

Thank you very much.

Best regards,
José Rui

[Bug fortran/94331] Bind(C) corrupts array descriptors

2021-05-30 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94331

--- Comment #10 from José Rui Faustino de Sousa  
---
Hi Dominique,

Thank you vary much for taking the time to test the patch.

If I understand you correctly the problem is on the test not on the patch
itself, right?

I have fixed the glaring mistake in PR94331.c, could you be so gentle as to
test it to verify that it does indeed solve the problems you found?

Thank you very much.

Best regards,
José Rui

[Bug fortran/94331] Bind(C) corrupts array descriptors

2021-05-30 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94331

--- Comment #9 from José Rui Faustino de Sousa  ---
Created attachment 50890
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50890=edit
Updated PR94331.c test file

[Bug fortran/100120] associated intrinsic failure

2021-05-29 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100120

--- Comment #4 from José Rui Faustino de Sousa  ---
Patch posted (hopefully correct this time):

https://gcc.gnu.org/pipermail/fortran/2021-May/056097.html

[Bug fortran/100816] Wrong span on widechar

2021-05-29 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100816

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056097.html

[Bug fortran/100818] A temporary is passed to associated

2021-05-29 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100818

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056097.html

[Bug fortran/100819] Wrong code generation with unlimited polymorphic objects and character type

2021-05-29 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100819

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056097.html

[Bug fortran/100821] Deferred character with wrong length

2021-05-29 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100821

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056097.html

[Bug fortran/100821] New: Deferred character with wrong bounds

2021-05-28 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100821

Bug ID: 100821
   Summary: Deferred character with wrong bounds
   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 50887
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50887=edit
Fortran code showing problem

Hi All!

Due to the way deferred character length is implemented, using SAVE_EXPR, it
will usually contain garbage.

Seen on: 

GNU Fortran (GCC) 9.3.1 20210526
GNU Fortran (GCC) 10.3.1 20210526
GNU Fortran (GCC) 11.1.1 20210526
GNU Fortran (GCC) 12.0.0 20210527 (experimental)

Thank you very much.

Best regards,
José Rui

[Bug fortran/100819] New: Wrong code generation with unlimited polymorphic objects and character type

2021-05-28 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100819

Bug ID: 100819
   Summary: Wrong code generation with unlimited polymorphic
objects and character type
   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 50886
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50886=edit
Fortran code showing problem

Hi All!

Mostly improperly set "_len", "elem_len" or "span".

Seen on:

GNU Fortran (GCC) 11.1.1 20210526
GNU Fortran (GCC) 12.0.0 20210527 (experimental)

ICEs on:

GNU Fortran (GCC) 9.3.1 20210526
GNU Fortran (GCC) 10.3.1 20210526

Thank you very much.

Best regards,
José Rui

[Bug fortran/100120] associated intrinsic failure

2021-05-28 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100120

--- Comment #3 from José Rui Faustino de Sousa  ---
Please ignore anterior patch as it contains really bad errors a corrected one
will follow shortly.

[Bug fortran/100818] New: A temporary is passed to associated

2021-05-28 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100818

Bug ID: 100818
   Summary: A temporary is passed to associated
   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 50885
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50885=edit
Fortran code showing problem

Hi All!

The code generates a temporary to pass to associated...

Seen on:

GNU Fortran (GCC) 9.3.1 20210526
GNU Fortran (GCC) 10.3.1 20210526
GNU Fortran (GCC) 11.1.1 20210526
GNU Fortran (GCC) 12.0.0 20210527 (experimental)

Thank you very much.

Best regards,
José Rui

[Bug fortran/100816] New: Wrong span on widechar

2021-05-28 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100816

Bug ID: 100816
   Summary: Wrong span on widechar
   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 50884
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50884=edit
Fortran code showing problem

Hi all!

Array descriptor span does not reflect larger number of bytes on widechar.

Seen on:

GNU Fortran (GCC) 9.3.1 20210526
GNU Fortran (GCC) 10.3.1 20210526
GNU Fortran (GCC) 11.1.1 20210526
GNU Fortran (GCC) 12.0.0 20210527 (experimental)

Thank you very much.

Best regards,
José Rui

[Bug fortran/97046] Bad interaction between lbound/ubound, allocatable arrays and bind(C) subroutine with dimension(..) parameter

2021-05-19 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97046

José Rui Faustino de Sousa  changed:

   What|Removed |Added

 CC||jrfsousa at gcc dot gnu.org

--- Comment #6 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html

[Bug fortran/94331] Bind(C) corrupts array descriptors

2021-05-19 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94331

--- Comment #6 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html

[Bug fortran/94327] Bind(c) argument attributes are incorrectly set

2021-05-19 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94327

--- Comment #3 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html

[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)

2021-05-19 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963

--- Comment #4 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html

[Bug fortran/93308] bind(c) subroutine changes lower bound of array argument in caller

2021-05-19 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93308

--- Comment #4 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html

[Bug fortran/100683] Array initialization refuses valid

2021-05-19 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-May/056053.html

[Bug fortran/100683] New: Array initialization refuses valid

2021-05-19 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100683

Bug ID: 100683
   Summary: Array initialization refuses valid
   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 50846
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50846=edit
Fortran code showing problem

Hi All!

Refuses valid array initialization with bogus error.

Seen on:

GNU Fortran (GCC) 9.3.1 20210514
GNU Fortran (GCC) 10.3.1 20210514
GNU Fortran (GCC) 11.1.1 20210514
GNU Fortran (GCC) 12.0.0 20210514 (experimental)

Thank you very much.

Best regards,
José Rui

[Bug fortran/93308] bind(c) subroutine changes lower bound of array argument in caller

2021-05-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93308

José Rui Faustino de Sousa  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jrfsousa at gcc dot 
gnu.org
 CC||jrfsousa at gcc dot gnu.org

--- Comment #3 from José Rui Faustino de Sousa  ---
Hi Sandra!

Hi I have a patch for this, which also seems to work for PR93 I expect to post
it in the next week, if all goes well.

Best regards,
José Rui

[Bug fortran/94331] Bind(C) corrupts array descriptors

2021-05-14 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94331

--- Comment #5 from José Rui Faustino de Sousa  ---
Hi Sandra!

I have a patch for this problem, which also seems to work for PR93308, I expect
to post it in the next week, if all goes well.

Best regards,
José Rui

[Bug fortran/92621] Problems with memory handling with allocatable intent(out) arrays with bind(c)

2021-05-07 Thread jrfsousa at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92621

--- Comment #14 from José Rui Faustino de Sousa  
---
On 28/04/21 18:49, anlauf at gcc dot gnu.org wrote:
> Did you log in with your @gcc.gnu.org account?
> 

Yes, changing the login email seems to have done the trick.

Thank you very much for your help!

Best regards,
José Rui