-/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-* All rights reserved.
-*
-* Authors: Christian Schaefer, Goetz Lindenmaier
-*
-* testprogram.
-*/
+/*
+ * Project: libFIRM
+ * File name: testprograms/if_example.c
+ * Purpose: Shows construction of if.
+ * Author: Christian Schaefer, Goetz Lindenmaier
+ * Modified by:
+ * Created:
+ * CVS-ID: $Id$
+ * Copyright: (c) 1999-2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ */
# include <stdio.h>
# include <string.h>
/* generate and fill the then block */
r = new_immBlock ();
add_in_edge (r, t);
- a = new_Sub(get_value(a_pos, mode_Is),
- new_Const (mode_Is, new_tarval_from_long (3, mode_Is)),
+ {
+ ir_node *b,*c;
+ c = new_Const (mode_Is, new_tarval_from_long (3, mode_Is));
+ b = get_value(a_pos, mode_Is);
+ a = new_Sub(b,
+ c,
mode_Is);
+ }
set_value (a_pos, a);
mature_block (r);