X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=testprograms%2Fcall_str_example.c;h=76b2693f760fd71c2125a1d204ea1adb9522bc76;hb=bc772df6ffc43cc8d73b0fb3d8d43a1c8ebf1c25;hp=26d143df3cc29094691536876e3017abe665cb1d;hpb=dddcc630819f338c3b45e2bc646233e6872d5bb6;p=libfirm diff --git a/testprograms/call_str_example.c b/testprograms/call_str_example.c index 26d143df3..76b2693f7 100644 --- a/testprograms/call_str_example.c +++ b/testprograms/call_str_example.c @@ -51,7 +51,9 @@ int main(int argc, char **argv) U8 = new_type_primitive (new_id_from_chars("char", 4), mode_Bu); /* An array containing unsigned 8 bit elements. */ U8array = new_type_array (new_id_from_chars("char_arr", 8), 1, U8); - string_ptr = new_type_pointer (new_id_from_chars ("ptr_to_string", 13), U8array); + set_array_lower_bound_int(U8array, 0, 0); + + string_ptr = new_type_pointer (new_id_from_chars ("ptr_to_string", 13), U8array, mode_P); /* Make a global entity that represents the constant String. */ const_str = new_entity(get_glob_type(), new_id_from_str("constStr"), U8array); @@ -129,7 +131,7 @@ int main(int argc, char **argv) /* Now we can mature the end block as all it's predecessors are known. */ mature_immBlock (get_irg_end_block(irg)); - finalize_cons (irg); + irg_finalize_cons (irg); printf("Optimizing ...\n"); dead_node_elimination(irg);