[Bug fortran/78492] [OOP] Compiler segfault with non_overridable function in generic interface

2024-11-27 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78492 --- Comment #8 from federico --- Amazing, thank you!

[Bug fortran/114023] complex part%ref of complex named constant array cannot be used in an initialization expression.

2024-11-17 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114023 federico changed: What|Removed |Added CC||federico.perini at gmail dot com --- Commen

[Bug tree-optimization/105558] simple 8-bit integer calculation fails with -O3 / march=core-avx2 on some gfortran 8/9/10 versions

2024-11-16 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105558 --- Comment #10 from federico --- Hi Sam, Thanks for looking into it - here is a simplified version of the test program: you can also test it live at the Compiler Explorer, at this link: https://godbolt.org/z/r63G348hM Thanks, Federico modul

[Bug fortran/115542] New: Invalid finalization in derived type containing allocatable entities

2024-06-18 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115542 Bug ID: 115542 Summary: Invalid finalization in derived type containing allocatable entities Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug fortran/111952] New: Allocatable of derived type with DTIO is not deallocated going out of scope

2023-10-24 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111952 Bug ID: 111952 Summary: Allocatable of derived type with DTIO is not deallocated going out of scope Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity:

[Bug fortran/109076] class extending abstract type with deferred procedures, with another unrelated procedure interface, crashes on valid code

2023-03-09 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109076 --- Comment #2 from federico --- Sorry I meant it does not compile what I think is valid code: subroutine i_expand matches the given abstract interface exactly, I can't find a shape mismatch. I wound two ways that will make the error go away:

[Bug fortran/109076] New: class extending abstract type with deferred procedures, with another unrelated procedure interface, crashes on valid code

2023-03-08 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109076 Bug ID: 109076 Summary: class extending abstract type with deferred procedures, with another unrelated procedure interface, crashes on valid code Product: gcc Ve

[Bug fortran/108431] Loop variable reaching integer `huge` causes infinte loop

2023-01-17 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108431 federico changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug fortran/108431] New: Loop variable reaching integer `huge` causes infinte loop

2023-01-17 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108431 Bug ID: 108431 Summary: Loop variable reaching integer `huge` causes infinte loop Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal P

[Bug fortran/106731] ICE on automatic array of derived type with DTIO

2022-12-23 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106731 --- Comment #11 from federico --- Thank you. I can confirm the patch works. I thought that, while fixing the issue, removing the assert was not the best solution as automatic arrays are not supposed to be static. My bad. Happy holidays, Fe

[Bug fortran/107489] New: Runtime segfault in finalization routine of derived type with allocatable components

2022-11-01 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107489 Bug ID: 107489 Summary: Runtime segfault in finalization routine of derived type with allocatable components Product: gcc Version: 12.1.0 Status: UNCONFIRMED S

[Bug fortran/107362] Internal compiler error for recursive class

2022-11-01 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107362 --- Comment #4 from federico --- OK I will report a new bug.

[Bug fortran/107362] Segfault for recursive class

2022-10-31 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107362 federico changed: What|Removed |Added CC||federico.perini at gmail dot com --- Commen

[Bug fortran/107157] New: Weird out-of-bounds error with multiple move_alloc's

2022-10-05 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107157 Bug ID: 107157 Summary: Weird out-of-bounds error with multiple move_alloc's Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Comp

[Bug fortran/106790] New: Weird SIGSEV using polymorphic routine with "select type" and optimization (-O3)

2022-08-31 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106790 Bug ID: 106790 Summary: Weird SIGSEV using polymorphic routine with "select type" and optimization (-O3) Product: gcc Version: 12.1.0 Status: UNCONFIRMED Sever

[Bug fortran/106750] Memory leak calling array slice of derived type containing `allocatable` entries

2022-08-31 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106750 --- Comment #3 from federico --- Thank you for checking this. So if I make the temporary array explicit, the leak goes away. In the case of the example i.e. 1) fixed-size and 2) very few elements are passed to the routine, it seems it would j

[Bug fortran/106771] [OOP] ICE with PACK intrinsic, in gfc_conv_expr_descriptor, at fortran/trans-array.c:7328

2022-08-29 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106771 --- Comment #5 from federico --- My bad, the SEGFAULT is my mistake, I've made a half-baked example that does not work. Here's the fixed one: module test implicit none type::t integer, allocatable :: iloc(:) contains

[Bug fortran/106771] [OOP] ICE with PACK intrinsic, in gfc_conv_expr_descriptor, at fortran/trans-array.c:7328

2022-08-29 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106771 --- Comment #3 from federico --- Right: here is a version where the object is initialized: https://godbolt.org/z/o566cPG8P I also see that for the versions that compile (e.g., 11.1.0), there's a weird SEGFAULT error at this line: eleme

[Bug fortran/106771] New: [OOP] ICE with PACK intrinsic, in gfc_conv_expr_descriptor, at fortran/trans-array.c:7328

2022-08-29 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106771 Bug ID: 106771 Summary: [OOP] ICE with PACK intrinsic, in gfc_conv_expr_descriptor, at fortran/trans-array.c:7328 Product: gcc Version: 9.2.0 Status:

[Bug fortran/106750] New: Memory leak calling section of derived type containing `allocatable` entries

2022-08-26 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106750 Bug ID: 106750 Summary: Memory leak calling section of derived type containing `allocatable` entries Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity:

[Bug fortran/106731] ICE on automatic array of derived type with DTIO

2022-08-25 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106731 --- Comment #6 from federico --- Yeah this popped up playing with DTIO, this feature is not widely used apparently. I'll also try to get a copy of the gcc source code and build pipeline to see if I can help.

[Bug fortran/106731] ICE on automatic array of derived type with DTIO

2022-08-24 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106731 --- Comment #4 from federico --- The TREE_STATIC assert should be valid according to what reported in the implementation at report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48298 But, I can't tell what that means.

[Bug fortran/106731] ICE on automatic array of derived type with DTIO

2022-08-24 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106731 --- Comment #2 from federico --- For the sake of completeness, fixed-size does not cause an ICE: type(t) :: fixed(5) ! works

[Bug fortran/106731] New: ICE on automatic array of derived type with DTIO

2022-08-24 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106731 Bug ID: 106731 Summary: ICE on automatic array of derived type with DTIO Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Componen

[Bug fortran/106367] New: ICE in fold_convert_loc.c when referencing an array-of-structure-eleents from within a polymorphic function

2022-07-20 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106367 Bug ID: 106367 Summary: ICE in fold_convert_loc.c when referencing an array-of-structure-eleents from within a polymorphic function Product: gcc Version: 11.3.0

[Bug fortran/78492] [OOP] Compiler segfault with non_overridable function in generic interface

2022-06-15 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78492 --- Comment #6 from federico --- I've attached a simple test program that confirms ICE on gfortran 11.3.0. ICE is returned only if - the non_overridable procedure is part of a generic type-bound interface - that same generic is being called from

[Bug fortran/78492] [OOP] Compiler segfault with non_overridable function in generic interface

2022-06-15 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78492 --- Comment #5 from federico --- Created attachment 53145 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53145&action=edit test program: call non_overridable function from generic interface within polymorphic procedure

[Bug fortran/105558] simple 8-bit integer calculation fails with -O3 / march=core-avx2 on some gfortran 8/9/10 versions

2022-05-11 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105558 --- Comment #3 from federico --- -fno-vect-cost model also does not change behavior on gcc 11/7/6/5 (all OK)

[Bug fortran/105558] simple 8-bit integer calculation fails with -O3 / march=core-avx2 on some gfortran 8/9/10 versions

2022-05-11 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105558 --- Comment #2 from federico --- Ok so we have: gfortran | [...] -fno-tree-vectorize | [...] -fno-vect-cost-model 10.3 |OK | ERROR 9.3 |OK | ERROR

[Bug fortran/105558] New: simple 8-byte integer calculation fails with -O3 / march=core-avx2 on some gfortran 8/9/10 versions

2022-05-11 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105558 Bug ID: 105558 Summary: simple 8-byte integer calculation fails with -O3 / march=core-avx2 on some gfortran 8/9/10 versions Product: gcc Version: 10.3.0 Status: UNCONFIR

[Bug fortran/104927] Invalid array size specification accepted

2022-03-15 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104927 federico changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug fortran/104927] New: Invalid array size specification accepted

2022-03-15 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104927 Bug ID: 104927 Summary: Invalid array size specification accepted Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fort

[Bug fortran/101757] Simple integer assigment fails (off-seted by -1) when compiling with -O3

2021-08-03 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101757 --- Comment #2 from federico --- Tested on godbolt.org: https://godbolt.org/z/sPsdE6Y3W works on: 5.5, 6.3, all 10, all 11 error on: all 7, all 8, all 9

[Bug fortran/101757] Simple integer assigment fails (off-seted by -1) when compiling with -O3

2021-08-03 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101757 --- Comment #1 from federico --- Actually, the results are not "off-seted": whatever was to be set to 0 is properly set; values that should be set "+1" are given "-1" instead: itest(1)= 0 itest(2)=-1 test(1)= F test(2)= T Federico

[Bug fortran/101757] New: Simple integer assigment fails (off-seted by -1) when compiling with -O3

2021-08-03 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101757 Bug ID: 101757 Summary: Simple integer assigment fails (off-seted by -1) when compiling with -O3 Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: norm

[Bug fortran/59202] Erroneous argument aliasing with defined assignment

2021-06-03 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59202 --- Comment #4 from federico --- The self-assignment issue is present even if the derived type has no allocatable components. Here is a sample test program that gives an error with gfortran 10.2.0: module assign implicit none pr

[Bug fortran/59202] Erroneous argument aliasing with defined assignment

2021-06-03 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59202 federico changed: What|Removed |Added CC||federico.perini at gmail dot com --- Comment

[Bug fortran/98558] Scalar character parameter does not print warning if actual length >1

2021-01-07 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98558 federico changed: What|Removed |Added Resolution|--- |INVALID Status|WAITING

[Bug fortran/98558] New: Scalar character parameter does not print warning if actual length >1

2021-01-06 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98558 Bug ID: 98558 Summary: Scalar character parameter does not print warning if actual length >1 Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal

[Bug fortran/97380] polymorphic array assignment for `PACK`: ICE and runtime segfaults

2020-10-17 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97380 --- Comment #4 from federico --- I've attached another program that perhaps highlights the problem better. Even just *accessing* a polymorphic array with an array causes wrong output with gfortran 9.2.0: The attached program sends elements [3,

[Bug fortran/97380] polymorphic array assignment for `PACK`: ICE and runtime segfaults

2020-10-17 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97380 --- Comment #3 from federico --- Created attachment 49392 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49392&action=edit Other test program highlights issue in accessing polymorphic arrays with arrays

[Bug fortran/97455] New: ICE on invalid code (wrong pointer assignment) in SELECT TYPE construct

2020-10-16 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97455 Bug ID: 97455 Summary: ICE on invalid code (wrong pointer assignment) in SELECT TYPE construct Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal

[Bug fortran/97380] polymorphic array assignment for `PACK`: ICE and runtime segfaults

2020-10-13 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97380 --- Comment #2 from federico --- I have an update: if I remove the ELEMENTAL property from the assignment routines, I get this error in both the PACK and the array assignments: Error: Nonallocatable variable must not be polymorphic in intrins

[Bug fortran/97380] New: polymorphic array assignment for `PACK`: ICE and runtime segfaults

2020-10-12 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97380 Bug ID: 97380 Summary: polymorphic array assignment for `PACK`: ICE and runtime segfaults Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal