fixed the fix of the fix (that was fix)
[libfirm] / ir / tr / type.c
index 9872f29..b3fde33 100644 (file)
@@ -1,25 +1,32 @@
 /*
- * Project:     libFIRM
- * File name:   ir/tr/type.c
- * Purpose:     Representation of types.
- * Author:      Goetz Lindenmaier
- * Modified by: Michael Beck
- * Created:
- * CVS-ID:      $Id$
- * Copyright:   (c) 2001-2006 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
  */
 
 /**
- *
- *  @file type.c
+ * @file    type.c
+ * @brief   Representation of types.
+ * @author  Goetz Lindenmaier, Michael Beck
+ * @version $Id$
+ * @summary
  *
  *  Implementation of the datastructure to hold
  *  type information.
  *
- *  (C) 2001-2006 by Universitaet Karlsruhe
- *  Goetz Lindenmaier, Michael Beck
- *
  *  This module supplies a datastructure to represent all types
  *  known in the compiled program.  This includes types specified
  *  in the program as well as types defined by the language.  In the
 # include "config.h"
 #endif
 
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
 #ifdef HAVE_STRING_H
 # include <string.h>
 #endif
@@ -63,8 +64,6 @@
 #include "irprog_t.h"
 #include "ircons.h"
 #include "tpop_t.h"
-#include "typegmod.h"
-#include "mangle.h"
 #include "tv_t.h"
 #include "irhooks.h"
 #include "irtools.h"
@@ -2035,6 +2034,7 @@ ir_entity *frame_alloc_area(ir_type *frame_type, int size, int alignment, int at
 
   assert(is_frame_type(frame_type));
   assert(get_type_state(frame_type) == layout_fixed);
+  assert(get_type_alignment_bytes(frame_type) > 0);
 
   if (! a_byte)
     a_byte = new_type_primitive(new_id_from_chars("byte", 4), mode_Bu);