Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
957a1b14
Commit
957a1b14
authored
Mar 01, 2020
by
Paul Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch and ChangeLogs for PR92976
parent
12caab4f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
+50
-2
gcc/fortran/ChangeLog
+6
-0
gcc/fortran/match.c
+8
-2
gcc/testsuite/ChangeLog
+5
-0
gcc/testsuite/gfortran.dg/select_type_48.f90
+31
-0
No files found.
gcc/fortran/ChangeLog
View file @
957a1b14
2020-03-01 Paul Thomas <pault@gcc.gnu.org>
2020-03-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/92976
* match.c (select_type_set_tmp): If the selector array spec has
explicit bounds, make the temporary's bounds deferred.
2020-03-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/92959
PR fortran/92959
* trans-intrinsic.c (gfc_conv_associated): Eliminate
* trans-intrinsic.c (gfc_conv_associated): Eliminate
'nonzero_charlen' and move the chunk to evaluate zero character
'nonzero_charlen' and move the chunk to evaluate zero character
...
...
gcc/fortran/match.c
View file @
957a1b14
...
@@ -6327,8 +6327,14 @@ select_type_set_tmp (gfc_typespec *ts)
...
@@ -6327,8 +6327,14 @@ select_type_set_tmp (gfc_typespec *ts)
=
CLASS_DATA
(
selector
)
->
attr
.
dimension
;
=
CLASS_DATA
(
selector
)
->
attr
.
dimension
;
sym
->
attr
.
codimension
sym
->
attr
.
codimension
=
CLASS_DATA
(
selector
)
->
attr
.
codimension
;
=
CLASS_DATA
(
selector
)
->
attr
.
codimension
;
sym
->
as
if
(
CLASS_DATA
(
selector
)
->
as
->
type
!=
AS_EXPLICIT
)
=
gfc_copy_array_spec
(
CLASS_DATA
(
selector
)
->
as
);
sym
->
as
=
gfc_copy_array_spec
(
CLASS_DATA
(
selector
)
->
as
);
else
{
sym
->
as
=
gfc_get_array_spec
();
sym
->
as
->
rank
=
CLASS_DATA
(
selector
)
->
as
->
rank
;
sym
->
as
->
type
=
AS_DEFERRED
;
}
}
}
}
}
...
...
gcc/testsuite/ChangeLog
View file @
957a1b14
2020-03-01 Paul Thomas <pault@gcc.gnu.org>
2020-03-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/92976
* gfortran.dg/select_type_48.f90 : New test.
2020-03-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/92959
PR fortran/92959
* gfortran.dg/associated_8.f90 : New test.
* gfortran.dg/associated_8.f90 : New test.
...
...
gcc/testsuite/gfortran.dg/select_type_48.f90
0 → 100644
View file @
957a1b14
! { dg-do run }
!
! Test the fix for PR92976, in which the TYPE IS statement caused an ICE
! because of the explicit bounds of 'x'.
!
! Contributed by Gerhard Steinmetz <gscfq@t-online.de>
!
program
p
type
t
integer
::
i
end
type
class
(
t
),
allocatable
::
c
(:)
allocate
(
c
,
source
=
[
t
(
1111
),
t
(
2222
),
t
(
3333
)])
call
s
(
c
)
if
(
sum
(
c
%
i
)
.ne.
3333
)
stop
1
contains
subroutine
s
(
x
)
class
(
t
)
::
x
(
2
)
select
type
(
x
)
! ICE as compiler attempted to assign descriptor to an array
type
is
(
t
)
x
%
i
=
0
! Make sure that bounds are correctly translated.
call
counter
(
x
)
end
select
end
subroutine
counter
(
arg
)
type
(
t
)
::
arg
(:)
if
(
size
(
arg
,
1
)
.ne.
2
)
stop
2
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment