* [Patch, Fortran, v1] Cosmetics and code simplify
@ 2015-03-20 13:55 Andre Vehreschild
2015-03-23 12:08 ` Mikael Morin
0 siblings, 1 reply; 2+ messages in thread
From: Andre Vehreschild @ 2015-03-20 13:55 UTC (permalink / raw)
To: GCC-Patches-ML, GCC-Fortran-ML
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
Hi all,
during checking that pr 61275 is really fixed, I found a indentation issue and
a piece of my former code, that could be done nicer and more readable. This
patch addresses both these issues.
Bootstraps and regtests ok on x86_64-linux-gnu/F20.
Ok for trunk?
Regards,
Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de
[-- Attachment #2: cosm_simp.clog --]
[-- Type: application/octet-stream, Size: 226 bytes --]
gcc/fortran/ChangeLog:
2015-03-20 Andre Vehreschild <vehre@gmx.de>
* trans-expr.c (gfc_conv_structure): Fixed indendation.
Using integer_zero_node now instead of explicitly
constructing a integer constant zero node.
[-- Attachment #3: cosm_simp.patch --]
[-- Type: text/x-patch, Size: 1301 bytes --]
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index a30c391..f6fe9a1 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -7111,7 +7111,7 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init)
of EXPR_NULL,... by default, the static nullify is not needed
since this is done every time we come into scope. */
if (!c->expr || (cm->attr.allocatable && cm->attr.flavor != FL_PROCEDURE))
- continue;
+ continue;
if (cm->initializer && cm->initializer->expr_type != EXPR_NULL
&& strcmp (cm->name, "_extends") == 0
@@ -7132,13 +7132,9 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init)
val));
}
else if (cm->ts.type == BT_INTEGER && strcmp (cm->name, "_len") == 0)
- {
- gfc_expr *e = gfc_get_int_expr (gfc_default_integer_kind, NULL, 0);
- val = gfc_conv_constant_to_tree (e);
- CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl,
- fold_convert (TREE_TYPE (cm->backend_decl),
- val));
- }
+ CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl,
+ fold_convert (TREE_TYPE (cm->backend_decl),
+ integer_zero_node));
else
{
val = gfc_conv_initializer (c->expr, &cm->ts,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch, Fortran, v1] Cosmetics and code simplify
2015-03-20 13:55 [Patch, Fortran, v1] Cosmetics and code simplify Andre Vehreschild
@ 2015-03-23 12:08 ` Mikael Morin
0 siblings, 0 replies; 2+ messages in thread
From: Mikael Morin @ 2015-03-23 12:08 UTC (permalink / raw)
To: Andre Vehreschild, GCC-Patches-ML, GCC-Fortran-ML
Le 20/03/2015 14:51, Andre Vehreschild a écrit :
> Hi all,
>
> during checking that pr 61275 is really fixed, I found a indentation issue and
> a piece of my former code, that could be done nicer and more readable. This
> patch addresses both these issues.
>
> Bootstraps and regtests ok on x86_64-linux-gnu/F20.
>
> Ok for trunk?
>
OK, thanks.
Mikael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-23 12:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 13:55 [Patch, Fortran, v1] Cosmetics and code simplify Andre Vehreschild
2015-03-23 12:08 ` Mikael Morin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).