diff options
Diffstat (limited to 'usr.bin/pcc/cc/ccom/pftn.c')
-rw-r--r-- | usr.bin/pcc/cc/ccom/pftn.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/pcc/cc/ccom/pftn.c b/usr.bin/pcc/cc/ccom/pftn.c index f709122a539..7d4c3a8169b 100644 --- a/usr.bin/pcc/cc/ccom/pftn.c +++ b/usr.bin/pcc/cc/ccom/pftn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pftn.c,v 1.2 2007/09/15 22:04:39 ray Exp $ */ +/* $OpenBSD: pftn.c,v 1.3 2007/09/16 18:52:52 otto Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). * All rights reserved. @@ -1347,7 +1347,10 @@ dynalloc(struct symtab *p, int *poff) pol = buildtree(MUL, pol, n); } /* Create stack gap */ - spalloc(tn, pol, tsize(t, 0, p->ssue)); + if (pol == NIL) + uerror("aggregate dynamic array not allowed"); + else + spalloc(tn, pol, tsize(t, 0, p->ssue)); arrstkp = 0; } |