[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 Uroš Bizjak changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #21 from Uroš Bizjak --- Test case fixed.
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #20 from uros at gcc dot gnu.org --- Author: uros Date: Sun Jan 27 20:53:30 2019 New Revision: 268327 URL: https://gcc.gnu.org/viewcvs?rev=268327=gcc=rev Log: PR fortran/70696 * gfortran.dg/coarray/event_3.f0: Add save attribue to x. Modified: branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray/event_3.f08
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #19 from uros at gcc dot gnu.org --- Author: uros Date: Sun Jan 27 20:48:51 2019 New Revision: 268326 URL: https://gcc.gnu.org/viewcvs?rev=268326=gcc=rev Log: PR fortran/70696 * gfortran.dg/coarray/event_3.f0: Add save attribue to x. Modified: branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/testsuite/gfortran.dg/coarray/event_3.f08
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #18 from uros at gcc dot gnu.org --- Author: uros Date: Sun Jan 27 20:44:36 2019 New Revision: 268325 URL: https://gcc.gnu.org/viewcvs?rev=268325=gcc=rev Log: PR fortran/70696 * gfortran.dg/coarray/event_3.f0: Add save attribue to x. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/coarray/event_3.f08
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 Uroš Bizjak changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #17 from Uroš Bizjak --- (In reply to vehre from comment #9) > Author: vehre > Date: Fri Jan 13 10:22:21 2017 > New Revision: 244407 > > URL: https://gcc.gnu.org/viewcvs?rev=244407=gcc=rev > Log: > gcc/testsuite/ChangeLog: > > 2017-01-13 Andre Vehreschild > > PR fortran/70696 > * gfortran.dg/coarray/event_3.f08: New test. What is this test supposed to test? The _.optimized dump shows only: --cut here-- ;; Function main (main, funcdef_no=2, decl_uid=952, cgraph_uid=3, symbol_order=2) (executed once) __attribute__((externally_visible)) main (integer(kind=4) argc, character(kind=1) * * argv) { struct FRAME.global_event FRAME.1; static integer(kind=4) options.0[7] = {2116, 4095, 0, 1, 1, 0, 31}; integer(kind=4) _8; [local count: 1073741824]: _gfortran_set_args (argc_2(D), argv_3(D)); _gfortran_set_options (7, [0]); _8 = FRAME.1.x; if (_8 != 0) goto ; [0.04%] else goto ; [99.96%] [local count: 429497]: _gfortran_error_stop_numeric (1, 0); [local count: 1073312328]: return 0; } --cut here-- which results in uninitialized load from FRAME.1. The resulting x86_64 assembly is: main: .LFB2: .cfi_startproc subq$8, %rsp .cfi_def_cfa_offset 16 call_gfortran_set_args movl$options.0.3867, %esi movl$7, %edi call_gfortran_set_options xorl%eax, %eax addq$8, %rsp .cfi_def_cfa_offset 8 ret .cfi_endproc which does not test anything. While x86_64 optimizers are able to eliminate uninitialized load, it remains in alpha assembly: main: .frame $30,32,$26,0 .mask 0x400,-32 $LFB2: .cfi_startproc ldah $29,0($27) !gpdisp!1#,, lda $29,0($29) !gpdisp!1#,, $main..ng: lda $30,-32($30) #,, .cfi_def_cfa_offset 32 ldq $27,_gfortran_set_args($29) !literal!3 #,,, stq $26,0($30) #, .cfi_offset 26, -32 .prologue 1 # event_3.f08:10: call exchange jsr $26,($27),_gfortran_set_args!lituse_jsr!3#,, ldah $29,0($26) !gpdisp!4# lda $16,7($31) #, lda $29,0($29) !gpdisp!4#,, ldah $17,options.0.956($29) !gprelhigh # tmp75,, lda $17,options.0.956($17) !gprellow#,, tmp75 ldq $27,_gfortran_set_options($29) !literal!5 #,,, jsr $26,($27),_gfortran_set_options !lituse_jsr!5#,, ldah $29,0($26) !gpdisp!6# # event_3.f08:17: if (cnt /= 2) error stop 1 ldl $1,16($30) # FRAME.1.x, FRAME.1.x # event_3.f08:10: call exchange lda $29,0($29) !gpdisp!6#,, # event_3.f08:17: if (cnt /= 2) error stop 1 bis $31,$31,$31 bne $1,$L4 #, FRAME.1.x, # event_3.f08:10: call exchange mov $31,$0 #, ldq $26,0($30) #, lda $30,32($30) #,, .cfi_remember_state .cfi_restore 26 .cfi_def_cfa_offset 0 ret $31,($26),1 $L4: .cfi_restore_state # event_3.f08:17: if (cnt /= 2) error stop 1 mov $31,$17 #, ldq $27,_gfortran_error_stop_numeric($29) !literal!2 #,,, lda $16,1($31) #, jsr $26,($27),_gfortran_error_stop_numeric !lituse_jsr!2 #,, .cfi_endproc $LFE2: bis $31,$31,$31 .end main Please note: ldl $1,16($30) # FRAME.1.x, FRAME.1.x ... bne $1,$L4 #, FRAME.1.x, Which loads uninitialized value from the stack and later branches on non-zero value. When the testcase is sun inside the debugger, it is evident that a garbage value is loaded from the 16($30) stack location.
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 vehre at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED --- Comment #16 from vehre at gcc dot gnu.org --- No regressions reported. Closing.
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #15 from vehre at gcc dot gnu.org --- Author: vehre Date: Sun Jan 29 15:14:41 2017 New Revision: 245016 URL: https://gcc.gnu.org/viewcvs?rev=245016=gcc=rev Log: libgfortran/ChangeLog: 2017-01-29 Andre VehreschildBackport from trunk 2017-01-13 Andre Vehreschild PR fortran/68887 PR fortran/70696 * caf/single.c (_gfortran_caf_register): Allocate enough memory for the event counter. Modified: branches/gcc-6-branch/libgfortran/caf/single.c
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #14 from vehre at gcc dot gnu.org --- Backported to gcc-6. Waiting one week for regressions before closing.
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #13 from vehre at gcc dot gnu.org --- Author: vehre Date: Sun Jan 29 13:50:23 2017 New Revision: 245014 URL: https://gcc.gnu.org/viewcvs?rev=245014=gcc=rev Log: 2017-01-29 Andre VehreschildBackport from trunk PR fortran/70696 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl is valid before accessing it. Remove unnecessary assert. * trans-decl.c (gfc_build_qualified_array): Add static tokens to the parent function's scope only, when the decl-context is not the translation unit. 2017-01-29 Andre Vehreschild Backport from trunk 2017-01-19 Andre Vehreschild PR fortran/70696 * gfortran.dg/coarray_43.f90: New test. 2017-01-18 Andre Vehreschild PR fortran/70696 * gfortran.dg/coarray_event_1.f08: New test. 2017-01-13 Andre Vehreschild PR fortran/70696 * gfortran.dg/coarray/event_3.f08: New test. Added: branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray/event_3.f08 branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_43.f90 branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_event_1.f08 Modified: branches/gcc-6-branch/gcc/fortran/ChangeLog branches/gcc-6-branch/gcc/fortran/trans-decl.c branches/gcc-6-branch/gcc/fortran/trans-expr.c branches/gcc-6-branch/gcc/testsuite/ChangeLog
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #12 from vehre at gcc dot gnu.org --- Author: vehre Date: Thu Jan 19 15:52:32 2017 New Revision: 244637 URL: https://gcc.gnu.org/viewcvs?rev=244637=gcc=rev Log: gcc/fortran/ChangeLog: 2017-01-19 Andre VehreschildPR fortran/70696 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent function only, when the decl-context is not the translation unit. gcc/testsuite/ChangeLog: 2017-01-19 Andre Vehreschild PR fortran/70696 * gfortran.dg/coarray_43.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/coarray_43.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #11 from vehre at gcc dot gnu.org --- Author: vehre Date: Wed Jan 18 18:35:41 2017 New Revision: 244587 URL: https://gcc.gnu.org/viewcvs?rev=244587=gcc=rev Log: gcc/fortran/ChangeLog: 2017-01-17 Andre VehreschildPR fortran/70696 Missed some parts, here they are: * trans-decl.c (gfc_build_qualified_array): Add static tokens to the parent function's scope. * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove unnecessary assert. gcc/testsuite/ChangeLog: 2017-01-17 Andre Vehreschild PR fortran/70696 * gfortran.dg/coarray_event_1.f08: New test. Added: trunk/gcc/testsuite/gfortran.dg/coarray_event_1.f08 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #10 from Dominique d'Humieres --- Compiling the test in comment 0 with -fcoarray=lib -lcaf_single at r244453 fails at link time with Undefined symbols for architecture x86_64: "_caf_token.0.3515", referenced from: __caf_init.1.3517 in ccsoo9HI.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #9 from vehre at gcc dot gnu.org --- Author: vehre Date: Fri Jan 13 10:22:21 2017 New Revision: 244407 URL: https://gcc.gnu.org/viewcvs?rev=244407=gcc=rev Log: gcc/testsuite/ChangeLog: 2017-01-13 Andre VehreschildPR fortran/70696 * gfortran.dg/coarray/event_3.f08: New test. gcc/fortran/ChangeLog: 2017-01-13 Andre Vehreschild PR fortran/70696 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl is valid before accessing it. libgfortran/ChangeLog: 2017-01-13 Andre Vehreschild PR fortran/70696 * caf/single.c (_gfortran_caf_register): Allocate enough memory for the event counter. Added: trunk/gcc/testsuite/gfortran.dg/coarray/event_3.f08 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog trunk/libgfortran/ChangeLog trunk/libgfortran/caf/single.c
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #8 from vehre at gcc dot gnu.org --- Patch available at: https://gcc.gnu.org/ml/fortran/2017-01/msg00031.html Waiting for review. Backport to gcc-6 available.
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 --- Comment #7 from vehre at gcc dot gnu.org --- The causes for both pr67073 and this one were the backend_decl of symbol to lock/event on being created. A small patch to come will solve this shortly.
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 vehre at gcc dot gnu.org changed: What|Removed |Added CC||danlnagle at me dot com --- Comment #6 from vehre at gcc dot gnu.org --- *** Bug 67073 has been marked as a duplicate of this bug. ***
[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696 vehre at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 CC||vehre at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |vehre at gcc dot gnu.org