Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With file ./gcc/testsuite/gfortran.dg/associate_26.f90 :
$ gfortran-8-20171105 -c associate_26.f90 -fcoarray=single
$
$ gfortran-8-20171105 -c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65428
G. Steinmetz changed:
What|Removed |Added
CC||gs...@t-online.de
--- Comment #5 from G
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
Derived from a modified legacy code :
$ cat z1.f90
program p
character :: c(4) = [1h(, 1hi, 1h4, 1h)]
end
$ gfortran-8-20171105 -c
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With file ./gcc/testsuite/gfortran.dg/c_ptr_tests_9.f03 :
$ gfortran-8-20171105 -c c_ptr_tests_9.f03 -finit-derived
c_ptr_tests_9.f03:22
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82886
--- Comment #1 from G. Steinmetz ---
A possible reduction :
$ cat z1.f90
program p
use, intrinsic :: iso_c_binding, only: c_ptr, c_null_ptr
type t
type(c_ptr) :: my_c_ptr
end type
contains
subroutine sub0() bind(c)
type(t), tar
: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
Together with -fcoarray=lib at -Os, -O1 or higher :
$ cat z1.f90
program p
save
character(:), allocatable :: x
character(:), allocatable :: y[:]
allocate (character(3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82904
--- Comment #1 from G. Steinmetz ---
Without this explicit "save" in above source, an ICE only occurs with
additional option -fno-automatic (which implies "save") :
$ cat z2.f90
program p
character(:), allocatable :: x
character(:), allo
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
This variant does not compile with snapshot from 20171112 :
$ cat z1.f90
module m
type t
real, allocatable :: x(:)
procedure(f), nopass, pointer :: g
end
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82969
--- Comment #1 from G. Steinmetz ---
These variants compile :
$ cat z2.f90
module m
type t
real, allocatable :: x(:)
procedure(f), nopass, pointer :: g
end type
contains
function f() result(z)
class(t), pointer :: z
: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
Wrapping source "x" :
$ cat z1.f90
program p
type t
end type
class(t), allocatable :: x(:)[:]
class(t), allocatable :: z(:)
allocate (x(2)[*])
a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82970
--- Comment #1 from G. Steinmetz ---
This variant compiles, of course :
$ cat z3.f90
program p
type t
end type
class(t), allocatable :: x(:)[:]
class(t), allocatable :: z(:)
allocate (x(2)[*])
allocate (z, source=x)
end
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
Another issue :
$ cat z1.f90
module m
type t
integer :: n
end type
class(t), target :: z
type t2
class(t), pointer :: x =>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82971
--- Comment #1 from G. Steinmetz ---
$ cat z2.f90
module m
type t
end type
class(t), target :: z
type t2
class(t), pointer :: x => z
end type
end
$ gfortran-8-20171112 -c z2.f90
f951: internal compiler error: Segmentation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82972
--- Comment #1 from G. Steinmetz ---
Files from catalog ./gcc/testsuite/gfortran.dg :
pdt_10.f03
pdt_2.f03
$ gfortran-8-20171105 -finit-derived -c pdt_2.f03
$ gfortran-8-20171112 -finit-derived -c pdt_2.f03
pdt_2.f03:25:0:
end subrou
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
There are a few issues with -finit-derived, probably a consequence
of pr82886. Please feel free to open separate PRs if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82972
--- Comment #2 from G. Steinmetz ---
Files from catalog ./gcc/testsuite/gfortran.dg :
pdt_3.f03
pdt_7.f03
$ gfortran-8-20171105 -finit-derived -c pdt_7.f03
$ gfortran-8-20171112 -finit-derived -c pdt_7.f03
pdt_7.f03:20:0:
end
internal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With invalid code :
$ cat z1.f90
subroutine sub (x)
use iso_fortran_env, only: x => character_kinds
end
$ gfortran-8-20171112 -c z1.f90
f
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With a wrong parameter definition :
$ cat z1.f90
program p
type t
real :: a(3)
end type
type(t), parameter :: z = 1
print *, z%a(1)
print *, z%a
end
$ gfortran-8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82993
G. Steinmetz changed:
What|Removed |Added
Summary|ICE free_expr0, at |ICE in free_expr0, at
|
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With invalid code (no pointer/allocatable attribute, nor allocated) :
$ cat z1.f90
program p
type t
end type
class(t) :: x
deallocate (x)
end
$ gfortran-8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82994
--- Comment #1 from G. Steinmetz ---
Now allocated, but still not declared allocatable :
(here gcc-chk was configured with --enable-checking=yes)
$ cat z2.f90
program p
type t
end type
class(t) :: x
allocate (x)
deallocate (x)
e
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With testcase from pr78781 comment 2 :
$ gfortran-8-20171029 -c z2.f90 -fcoarray=lib
$
$ gfortran-8
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With an undefined value "n" :
$ cat z1.f90
program p
implicit none
type t
integer :: a(n)
end type t
type(t) :: x = t([
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83078
--- Comment #1 from G. Steinmetz ---
Detected without "implicit none" :
$ cat z2.f90
program p
type t
integer :: a(n)
end type t
type(t) :: x = t([1, 2])
end
$ gfortran-8-20171119 -c z2.f90
z2.f90:3:19:
integer :: a(n)
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With this snippet :
$ cat z1.f90
program p
print *, transfer(4_'xy', [4_'a'])
end
$ gfortran-8-20171119 -c z1.f90
f951: internal compiler error: in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079
--- Comment #1 from G. Steinmetz ---
While these variants compile :
$ cat z3.f90
program p
print *, transfer('xy', ['a'])
end
$ cat z4.f90
program p
print *, transfer(4_'xy', [4_'ab'])
end
$ cat z5.f90
program p
print *, transfer(4_'
: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
Follow-up of pr78686 (where ICE is gone since about a month ago) :
$ cat z1.f90
program p
type t
integer :: n = 0
end type
type t2
character :: c = t()
end
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83092
--- Comment #1 from G. Steinmetz ---
Alternatives :
$ cat z2.f90
program p
type t
end type
type t2
character :: c(1) = [t()]
end type
end
$ cat z3.f90
program p
type t
integer :: a = 1
character :: c = t()
: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With invalid code, down to at least 4.8 :
$ cat z1.f90
program p
character(:), allocatable :: z
allocate (character(a) :: z)
end
$ cat z2.f90
program p
real :: a = 2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83093
--- Comment #1 from G. Steinmetz ---
These variants are silently accepted :
$ cat z4.f90
program p
character(:), allocatable :: z
allocate (character(z) :: z)
end
$ cat z5.f90
program p
character(:), allocatable :: z
allocate (ch
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With a mixture :
$ cat z1.f90
integer function f (a, b)
integer :: a, b[*]
!$omp declare simd
f = a + b
end
$ gfortran-8-20171119
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78238
G. Steinmetz changed:
What|Removed |Added
CC||gs...@t-online.de
--- Comment #9 from G
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With ./gcc/testsuite/gfortran.dg/move_alloc_17.f90 or this reduction :
$ cat z1.f90
program p
type :: linked_list
type(linked_list), allocatable :: link
integer :: value
end
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With invalid code and option -fdec-structure or -fdec :
$ cat z1.f90
program p
structure /s/
integer n(..) /1/
end structure
end
$ cat z2.f90
program p
structure /s
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With option -fsanitize=address and -Os|1+ :
$ cat z1.c
#include
void
f (int i, ...)
{
va_list aps[g()];
va_start (aps[4], i);
}
$ gcc
: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
This function reference in "s" misses obligatory parentheses :
$ cat z1.f90
program p
call s
contains
subroutine
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83196
--- Comment #1 from G. Steinmetz ---
With reversed order, i.e. definition of "f" first :
$ cat z2.f90
program p
call s
contains
character(3) function f()
f = 'abc'
end
subroutine s
if ( f /= 'abc' ) call abort
end
en
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83196
--- Comment #2 from G. Steinmetz ---
Slightly modified :
$ cat z3.f90
program p
call s
contains
subroutine s
if ( f /= '' ) call abort
end
character(3) function f()
f = ''
end
end
$ gfortran-8-20171126 -c z3.f90 -O
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
Depending on function, at different optimization levels :
$ cat z1.c
double sqrt ();
void f (float a)
{
a = sqrt ();
}
$ cat z2.c
double sin ();
void f (float a)
{
a = sin
: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
With this snippet :
$ cat z1.c
void f (int x)
{
char d[40];
int a = __builtin_sprintf (d, "%.a", x, 1.0
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
One remaining issue is that a PDT definition statement cannot have
an additional component-spec-list or a second type-param-name-list.
$ cat z1.f90
program p
type t(a)(b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83274
G. Steinmetz changed:
What|Removed |Added
Blocks||82173
--- Comment #1 from G. Steinmetz -
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
Related to pr83274, in order to avoid an overloaded PR.
According to f2008 4.5.3.1 and 1.4.3, a type-param-name-list in
a PDT definition
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83275
G. Steinmetz changed:
What|Removed |Added
Blocks||82173
--- Comment #1 from G. Steinmetz -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83275
--- Comment #2 from G. Steinmetz ---
$ cat z5.f90
program p
type t(a)
allocate (a)
end type
end
$ gfortran-8-20171203 -c z5.f90
f951: internal compiler error: Segmentation fault
0xb6a96f crash_signal
../../gcc/toplev.c:325
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gs...@t-online.de
Target Milestone: ---
This snippet together with -fopenmp :
$ cat z1.c
int f ()
{
int i;
#pragma omp parallel for
for (i = 0; i < 4; ++i)
__builtin_return (0);
}
$
701 - 746 of 746 matches
Mail list logo