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
fa9a7193
Commit
fa9a7193
authored
Sep 07, 2010
by
Jan Hubicka
Committed by
Jan Hubicka
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* trans-expr.c (gfc_conv_initializer): Set STATIC flags for initializers.
From-SVN: r163973
parent
f27e50db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
gcc/fortran/ChangeLog
+4
-0
gcc/fortran/trans-expr.c
+16
-4
No files found.
gcc/fortran/ChangeLog
View file @
fa9a7193
2010-09-07 Jan Hubicka <jh@suse.cz>
* trans-expr.c (gfc_conv_initializer): Set STATIC flags for initializers.
2010-09-07 Tobias Burnus <burnus@net-b.de>
PR fortran/45583
...
...
gcc/fortran/trans-expr.c
View file @
fa9a7193
...
...
@@ -4000,19 +4000,23 @@ gfc_conv_initializer (gfc_expr * expr, gfc_typespec * ts, tree type,
gfc_init_se
(
&
se
,
NULL
);
gfc_conv_constant
(
&
se
,
expr
);
gcc_assert
(
TREE_CODE
(
se
.
expr
)
!=
CONSTRUCTOR
);
return
se
.
expr
;
}
if
(
array
&&
!
procptr
)
{
tree
ctor
;
/* Arrays need special handling. */
if
(
pointer
)
return
gfc_build_null_descriptor
(
type
);
ctor
=
gfc_build_null_descriptor
(
type
);
/* Special case assigning an array to zero. */
else
if
(
is_zero_initializer_p
(
expr
))
return
build_constructor
(
type
,
NULL
);
ctor
=
build_constructor
(
type
,
NULL
);
else
return
gfc_conv_array_initializer
(
type
,
expr
);
ctor
=
gfc_conv_array_initializer
(
type
,
expr
);
TREE_STATIC
(
ctor
)
=
1
;
return
ctor
;
}
else
if
(
pointer
||
procptr
)
{
...
...
@@ -4023,6 +4027,7 @@ gfc_conv_initializer (gfc_expr * expr, gfc_typespec * ts, tree type,
gfc_init_se
(
&
se
,
NULL
);
se
.
want_pointer
=
1
;
gfc_conv_expr
(
&
se
,
expr
);
gcc_assert
(
TREE_CODE
(
se
.
expr
)
!=
CONSTRUCTOR
);
return
se
.
expr
;
}
}
...
...
@@ -4037,14 +4042,21 @@ gfc_conv_initializer (gfc_expr * expr, gfc_typespec * ts, tree type,
gfc_conv_structure
(
&
se
,
gfc_class_null_initializer
(
ts
),
1
);
else
gfc_conv_structure
(
&
se
,
expr
,
1
);
gcc_assert
(
TREE_CODE
(
se
.
expr
)
==
CONSTRUCTOR
);
TREE_STATIC
(
se
.
expr
)
=
1
;
return
se
.
expr
;
case
BT_CHARACTER
:
return
gfc_conv_string_init
(
ts
->
u
.
cl
->
backend_decl
,
expr
);
{
tree
ctor
=
gfc_conv_string_init
(
ts
->
u
.
cl
->
backend_decl
,
expr
);
TREE_STATIC
(
ctor
)
=
1
;
return
ctor
;
}
default:
gfc_init_se
(
&
se
,
NULL
);
gfc_conv_constant
(
&
se
,
expr
);
gcc_assert
(
TREE_CODE
(
se
.
expr
)
!=
CONSTRUCTOR
);
return
se
.
expr
;
}
}
...
...
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