17f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//===-- main2.c -------------------------------------------------*- C++ -*-===//
27f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//
37f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//                     The LLVM Compiler Infrastructure
47f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//
57f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// This file is distributed under the University of Illinois Open Source
67f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// License. See LICENSE.TXT for details.
77f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//
87f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//===----------------------------------------------------------------------===//
97f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen#include <stdio.h>
107f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen#include <stdlib.h>
117f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen
127f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chenint main(int argc, const char* argv[])
137f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen{
147f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen    int *int_ptr = (int *)malloc(sizeof(int));
157f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen    *int_ptr = 7;
167f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen    printf("Hello, world!\n");
177f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen    printf("Now not crash %d\n", *int_ptr); // Not crash here.
187f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen}
19