aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-10-06 14:47:40 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-10-06 14:47:40 +0000
commit3bf9ef1bc4eb7b28998569beecc1c1c750cf5b7a (patch)
treef4bcfb360a139359e574f0877bc9b5809f45c878 /gcc/fortran/primary.c
parent3d2e4fe6756027ec9826cd8bb94173f691c9a7f8 (diff)
downloadgcc-3bf9ef1bc4eb7b28998569beecc1c1c750cf5b7a.zip
gcc-3bf9ef1bc4eb7b28998569beecc1c1c750cf5b7a.tar.gz
gcc-3bf9ef1bc4eb7b28998569beecc1c1c750cf5b7a.tar.bz2
primary.c (gfc_match_structure_constructor): Invert the assert logic.
2010-10-06 Mikael Morin <mikael@gcc.gnu.org> * primary.c (gfc_match_structure_constructor): Invert the assert logic. From-SVN: r165033
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 9d0deec..054c66f 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2414,8 +2414,9 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result,
/* No component should be left, as this should have caused an error in the
loop constructing the component-list (name that does not correspond to any
component in the structure definition). */
- if (comp_head && sym->attr.extension)
+ if (comp_head)
{
+ gcc_assert (sym->attr.extension);
for (comp_iter = comp_head; comp_iter; comp_iter = comp_iter->next)
{
gfc_error ("component '%s' at %L has already been set by a "
@@ -2424,8 +2425,6 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result,
}
goto cleanup;
}
- else
- gcc_assert (!comp_head);
e = gfc_get_structure_constructor_expr (BT_DERIVED, 0, &where);
e->ts.u.derived = sym;