I would greatly appreciate any pointers on why this is occurring. /home/user/Documents/gccbuild/gcc/cc1 -isystem /opt/myarchtoolchain/myarch-elf/include -isystem /opt/myarchtoolchain/myarch-elf/sys-include -fexceptions /tmp/conftest.c foo Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary> <emutls> <whole-program>Assembling functions: foo*** Error in `/home/william_tambe/Documents/gccbuild2/gcc/cc1': munmap_chunk(): invalid pointer: 0x0a53a050 *** Program received signal SIGABRT, Aborted. 0xb76f3424 in __kernel_vsyscall () (gdb) bt #0 0xb76f3424 in __kernel_vsyscall () #1 0xb7455607 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #2 0xb7458a33 in __GI_abort () at abort.c:89 #3 0xb748fe53 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0xb758cedc "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #4 0xb749a33a in malloc_printerr (action=<optimized out>, str=0xb758cf00 "munmap_chunk(): invalid pointer", ptr=0xa53a050) at malloc.c:4996 #5 0xb749a408 in munmap_chunk (p=<optimized out>) at malloc.c:2816 #6 0x085626d1 in delete_trivially_dead_insns (insns=0xb70388c0, nreg=28) at ../../gcc-4.8.4/gcc/cse.c:7050 #7 0x0853e6a9 in execute_jump () at ../../gcc-4.8.4/gcc/cfgcleanup.c:3059 #8 0x0832f88f in execute_one_pass (pass=pass@entry=0x87a68c0 <pass_jump>) at ../../gcc-4.8.4/gcc/passes.c:2333 #9 0x0832fc65 in execute_pass_list (pass=0x87a68c0 <pass_jump>) at ../../gcc-4.8.4/gcc/passes.c:2381 #10 0x0832fc78 in execute_pass_list (pass=0x87a3f40 <pass_rest_of_compilation>) at ../../gcc-4.8.4/gcc/passes.c:2382 #11 0x08191c0b in expand_function (node=0xb70bb000) at ../../gcc-4.8.4/gcc/cgraphunit.c:1640 #12 0x081933fe in output_in_order () at ../../gcc-4.8.4/gcc/cgraphunit.c:1833 #13 compile () at ../../gcc-4.8.4/gcc/cgraphunit.c:2037 #14 0x0819365a in finalize_compilation_unit () at ../../gcc-4.8.4/gcc/cgraphunit.c:2119 #15 0x080cef86 in c_write_global_declarations () at ../../gcc-4.8.4/gcc/c/c-decl.c:10120 #16 0x08395b65 in compile_file () at ../../gcc-4.8.4/gcc/toplev.c:557 #17 0x08397734 in do_compile () at ../../gcc-4.8.4/gcc/toplev.c:1867 #18 toplev_main (argc=argc@entry=7, argv=argv@entry=0xbfe79fa4) at ../../gcc-4.8.4/gcc/toplev.c:1943 #19 0x080be21b in main (argc=7, argv=0xbfe79fa4) at ../../gcc-4.8.4/gcc/main.c:36 The code compiled was: ----------------------------------- /* confdefs.h */ #define PACKAGE_NAME "GNU C Runtime Library" #define PACKAGE_TARNAME "libgcc" #define PACKAGE_VERSION "1.0" #define PACKAGE_STRING "GNU C Runtime Library 1.0" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" #define SIZEOF_DOUBLE 0 #define SIZEOF_LONG_DOUBLE 0 #define HAVE_GETIPINFO 1 /* end confdefs.h. */ void bar (); void clean (int *); void foo () { int i __attribute__ ((cleanup (clean))); bar(); } ------------------------------------