* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
@ 2020-11-16 23:02 ` dominiq at lps dot ens.fr
2020-11-17 5:57 ` everythingfunctional at protonmail dot com
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-11-16 23:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2020-11-16
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Works for me on Big Sur with all the revision I have tried.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
2020-11-16 23:02 ` [Bug fortran/97864] " dominiq at lps dot ens.fr
@ 2020-11-17 5:57 ` everythingfunctional at protonmail dot com
2020-11-19 19:42 ` damian at sourceryinstitute dot org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: everythingfunctional at protonmail dot com @ 2020-11-17 5:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #2 from Brad Richardson <everythingfunctional at protonmail dot com> ---
(In reply to Dominique d'Humieres from comment #1)
> Works for me on Big Sur with all the revision I have tried.
I just update to Big Sur (initial report was still on Catalina), and am still
seeing the same issue. Did you note to uncomment the line in the `do_compare`
function? This is the line that triggers the ICE. Sorry if that was unclear.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
2020-11-16 23:02 ` [Bug fortran/97864] " dominiq at lps dot ens.fr
2020-11-17 5:57 ` everythingfunctional at protonmail dot com
@ 2020-11-19 19:42 ` damian at sourceryinstitute dot org
2020-11-19 20:27 ` damian at sourceryinstitute dot org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: damian at sourceryinstitute dot org @ 2020-11-19 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
Damian Rouson <damian at sourceryinstitute dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |damian at sourceryinstitute dot or
| |g
--- Comment #3 from Damian Rouson <damian at sourceryinstitute dot org> ---
Here's a reduced version of the original code, still causing an ICE:
implicit none
type VARYING_STRING
character(len=1), allocatable :: characters(:)
end type
interface operator(==)
procedure character_EQ_String
end interface
print *, stringToChar(var_str("Hello")) == var_str("World") ! causes ice
contains
logical function character_EQ_String(lhs, rhs)
character(len=*), intent(in) :: lhs
type(VARYING_STRING), intent(in) :: rhs
character_EQ_String = lhs == stringToChar(rhs)
end function
function stringToChar(string)
type(VARYING_STRING) string
character(len=size(string%characters)) :: stringToChar
stringToChar = ""
end function
type(VARYING_STRING) function VAR_STR(char)
character(len=*) char
integer i
VAR_STR%characters = [(char(i:i), i = 1, len(char))]
end function
end
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (2 preceding siblings ...)
2020-11-19 19:42 ` damian at sourceryinstitute dot org
@ 2020-11-19 20:27 ` damian at sourceryinstitute dot org
2020-11-19 20:36 ` iains at gcc dot gnu.org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: damian at sourceryinstitute dot org @ 2020-11-19 20:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #4 from Damian Rouson <damian at sourceryinstitute dot org> ---
The above reduced version produces an ICE with gfortran 11.0.0 2020815 built
from source so this is not specific to Homebrew but is specific to macOS.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (3 preceding siblings ...)
2020-11-19 20:27 ` damian at sourceryinstitute dot org
@ 2020-11-19 20:36 ` iains at gcc dot gnu.org
2020-11-19 20:49 ` everythingfunctional at protonmail dot com
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2020-11-19 20:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |iains at gcc dot gnu.org
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
a couple of additionsl questions - there is work on-going to update for Big Sur
(see PR97865)
what version of macOS?
what toolchain (Xcode version)?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (4 preceding siblings ...)
2020-11-19 20:36 ` iains at gcc dot gnu.org
@ 2020-11-19 20:49 ` everythingfunctional at protonmail dot com
2020-11-25 17:09 ` iains at gcc dot gnu.org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: everythingfunctional at protonmail dot com @ 2020-11-19 20:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #6 from Brad Richardson <everythingfunctional at protonmail dot com> ---
I recently updated to Big Sur, and have xcode version 12.2, but this initially
occurred on Catalina. I don't know exactly which version of xcode was installed
then.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (5 preceding siblings ...)
2020-11-19 20:49 ` everythingfunctional at protonmail dot com
@ 2020-11-25 17:09 ` iains at gcc dot gnu.org
2020-11-25 20:05 ` everythingfunctional at protonmail dot com
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2020-11-25 17:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Brad Richardson from comment #6)
> I recently updated to Big Sur, and have xcode version 12.2, but this
> initially occurred on Catalina. I don't know exactly which version of xcode
> was installed then.
With master at r11-5267
https://gcc.gnu.org/g:6692c400f207c68fb11b44182ae127856e8b9ad3
Mon 23rd Nov 2020
I cannot reproduce this on x86_64 MacOS 10.12, 10.15 or 11.0.
[I tried - no optimisation, -O2, -O -g ]
Please could you check if the problem persists for you and, if so:
* the command line used
* any output from the ICE.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (6 preceding siblings ...)
2020-11-25 17:09 ` iains at gcc dot gnu.org
@ 2020-11-25 20:05 ` everythingfunctional at protonmail dot com
2020-11-25 20:11 ` iains at gcc dot gnu.org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: everythingfunctional at protonmail dot com @ 2020-11-25 20:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #8 from Brad Richardson <everythingfunctional at protonmail dot com> ---
The below is a direct copy-paste from my terminal:
[Brads-MacBook-Pro:~/tmp/ice_mwe] cat mwe.f90
implicit none
type VARYING_STRING
character(len=1), allocatable :: characters(:)
end type
interface operator(==)
procedure character_EQ_String
end interface
print *, stringToChar(var_str("Hello")) == var_str("World") ! causes ice
contains
logical function character_EQ_String(lhs, rhs)
character(len=*), intent(in) :: lhs
type(VARYING_STRING), intent(in) :: rhs
character_EQ_String = lhs == stringToChar(rhs)
end function
function stringToChar(string)
type(VARYING_STRING) string
character(len=size(string%characters)) :: stringToChar
stringToChar = ""
end function
type(VARYING_STRING) function VAR_STR(char)
character(len=*) char
integer i
VAR_STR%characters = [(char(i:i), i = 1, len(char))]
end function
end
[Brads-MacBook-Pro:~/tmp/ice_mwe] gfortran -o mwe mwe.f90
f951: internal compiler error: Segmentation fault: 11
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
[Brads-MacBook-Pro:~/tmp/ice_mwe] gfortran --version
GNU Fortran (Homebrew GCC 10.2.0) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[Brads-MacBook-Pro:~/tmp/ice_mwe] xcode-select -version
xcode-select version 2384.
[Brads-MacBook-Pro:~/tmp/ice_mwe] xcodebuild -version
Xcode 12.2
Build version 12B45b
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (7 preceding siblings ...)
2020-11-25 20:05 ` everythingfunctional at protonmail dot com
@ 2020-11-25 20:11 ` iains at gcc dot gnu.org
2020-11-25 20:26 ` fxcoudert at gcc dot gnu.org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2020-11-25 20:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
I would not expect anything to have changed with 10.2 (it's a released version)
unless Homebrew were to back port something.
Are you able to test with 'master' (i.e. the development version for GCC-11)?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (8 preceding siblings ...)
2020-11-25 20:11 ` iains at gcc dot gnu.org
@ 2020-11-25 20:26 ` fxcoudert at gcc dot gnu.org
2020-11-25 20:31 ` iains at gcc dot gnu.org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2020-11-25 20:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
Status|WAITING |NEW
--- Comment #10 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
I can reproduce this with 10.2 on Catalina. The backtrace is:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x0)
* frame #0: 0x00000001426dfccf libgmp.10.dylib`__gmpz_sizeinbase + 21
frame #1: 0x0000000100fc2d29 f951`wi::from_mpz(tree_node const*,
__mpz_struct*, bool) + 57
frame #2: 0x0000000100082613 f951`gfc_typename(gfc_expr*) + 131
frame #3: 0x00000001000c821c f951`resolve_operator(gfc_expr*) + 1852
frame #4: 0x00000001000c2c48 f951`gfc_resolve_expr(gfc_expr*) (.part.0) +
1560
frame #5: 0x00000001000ceeec f951`gfc_resolve_code(gfc_code*,
gfc_namespace*) + 5212
frame #6: 0x00000001000d11ac f951`gfc_resolve_blocks(gfc_code*,
gfc_namespace*) + 668
frame #7: 0x00000001000cdd52 f951`gfc_resolve_code(gfc_code*,
gfc_namespace*) + 706
frame #8: 0x00000001000d2c5f f951`resolve_codes(gfc_namespace*) + 319
frame #9: 0x00000001000bd395 f951`gfc_resolve(gfc_namespace*) + 85
frame #10: 0x00000001000afeab f951`gfc_parse_file() + 731
frame #11: 0x000000010010b0c7 f951`gfc_be_parse_file() + 71
frame #12: 0x0000000100cdc72b f951`compile_file() + 43
frame #13: 0x0000000101162bcf f951`toplev::main(int, char**) + 2191
frame #14: 0x0000000101165a01 f951`main + 49
frame #15: 0x00007fff673a2cc9 libdyld.dylib`start + 1
frame #16: 0x00007fff673a2cc9 libdyld.dylib`start + 1
The only patch Homebrew is currently shipping with GCC 10.2 is this:
https://github.com/iains/gcc-darwin-arm64/commit/556ab512 which is most likely
unrelated
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (9 preceding siblings ...)
2020-11-25 20:26 ` fxcoudert at gcc dot gnu.org
@ 2020-11-25 20:31 ` iains at gcc dot gnu.org
2020-11-25 20:35 ` fxcoudert at gcc dot gnu.org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2020-11-25 20:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> ---
do you see this on mainline too?
(I do not - but building a 10.x debug compiler at present)
-- the trick will be to figure out what fortran patch(es) have apparently fixed
this on mainline.
There doesn't seem to be anything terribly darwin-specific in that backtrace.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (10 preceding siblings ...)
2020-11-25 20:31 ` iains at gcc dot gnu.org
@ 2020-11-25 20:35 ` fxcoudert at gcc dot gnu.org
2020-11-25 20:37 ` fxcoudert at gcc dot gnu.org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2020-11-25 20:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #12 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
I would bet that it's the same issue that was fixed by:
https://github.com/gcc-mirror/gcc/commit/81372618277bfae682434fcdc80b311ee6007476
2020-11-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/97768
gcc/fortran/
* misc.c (gfc_typename): Use ex->value.character.length only if
ex->expr_type == EXPR_CONSTANT. If ex->ts.deferred, print : instead
of length. If ex->ts.u.cl && ex->ts.u.cl->length == NULL, print *
instead of length. Otherwise if character length is non-constant,
print just CHARACTER or CHARACTER(KIND=N).
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (11 preceding siblings ...)
2020-11-25 20:35 ` fxcoudert at gcc dot gnu.org
@ 2020-11-25 20:37 ` fxcoudert at gcc dot gnu.org
2020-11-25 20:43 ` iains at gcc dot gnu.org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2020-11-25 20:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #13 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
And the backtrace is identical, too. It's a duplicated of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97768
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (12 preceding siblings ...)
2020-11-25 20:37 ` fxcoudert at gcc dot gnu.org
@ 2020-11-25 20:43 ` iains at gcc dot gnu.org
2020-11-25 20:45 ` fxcoudert at gcc dot gnu.org
2020-11-26 1:09 ` iains at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2020-11-25 20:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #14 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #13)
> And the backtrace is identical, too. It's a duplicated of
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97768
OK - so I imagine Jakub will back port when he's ready, and you can take it
temporarily on HB 10.x if needed?
(odd is that it didn't fire on Linux)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (13 preceding siblings ...)
2020-11-25 20:43 ` iains at gcc dot gnu.org
@ 2020-11-25 20:45 ` fxcoudert at gcc dot gnu.org
2020-11-26 1:09 ` iains at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2020-11-25 20:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
--- Comment #15 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
> you can take it temporarily on HB 10.x if needed?
Unless it's a real blocker (like the Big Sur backport I did), we ship released
versions unpatched.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/97864] Homebrew Operator Overload ICE
2020-11-16 20:33 [Bug fortran/97864] New: Homebrew Operator Overload ICE everythingfunctional at protonmail dot com
` (14 preceding siblings ...)
2020-11-25 20:45 ` fxcoudert at gcc dot gnu.org
@ 2020-11-26 1:09 ` iains at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2020-11-26 1:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97864
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |10.3
Resolution|--- |FIXED
--- Comment #16 from Iain Sandoe <iains at gcc dot gnu.org> ---
so this has been fixed on the 10 branch already by:
r10-9001-gf7c2be50afa7935d3a05e3c7761e69d8b539da5b
so fixed for 10.3.
(but 10.3 can be expected sometime towards the end of Q1 2021).
In the meantime, of course, one can build the active branch - but if you are on
macOS 11 (Darwin20) you might want to wait for a few more compatibility patches
to be applied.
^ permalink raw reply [flat|nested] 17+ messages in thread