mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
a68: avoid pack_soids_in_moid to return unregistered modes
This function fixes the pack_soids_in_moid function so it never returns a mode that has not been registered. Signed-off-by: Jose E. Marchesi <jemarch@gnu.org> gcc/algol68/ChangeLog * a68-moids-misc.cc (a68_pack_soids_in_moid): Return the result of a68_register_extra_mode. gcc/testsuite/ChangeLog * algol68/execute/pack-soids-in-moid-1.a68: New test.
This commit is contained in:
@@ -280,8 +280,8 @@ a68_pack_soids_in_moid (SOID_T *top_sl, int attribute)
|
||||
*p = t;
|
||||
p = &NEXT (t);
|
||||
}
|
||||
(void) a68_register_extra_mode (&TOP_MOID (&A68_JOB), x);
|
||||
return x;
|
||||
|
||||
return a68_register_extra_mode (&TOP_MOID (&A68_JOB), x);
|
||||
}
|
||||
|
||||
/* Whether P is compatible with Q. */
|
||||
|
||||
3
gcc/testsuite/algol68/execute/pack-soids-in-moid-1.a68
Normal file
3
gcc/testsuite/algol68/execute/pack-soids-in-moid-1.a68
Normal file
@@ -0,0 +1,3 @@
|
||||
begin []int lele = (1,2,3);
|
||||
assert (ELEMS (lele) = ELEMS (lele))
|
||||
end
|
||||
Reference in New Issue
Block a user