http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48188

           Summary: ICE: SIGSEGV in remove_unnecessary_regions
                    (ira-build.c:1855) with --param ira-max-loops-num=0 on
                    basic code
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz


----- testcase.c -----
void foo (void) { }
----------------------

Compiler output:
$ gcc --param ira-max-loops-num=0 testcase.c
==13273== Use of uninitialised value of size 8
==13273==    at 0x792776: remove_unnecessary_regions (ira-build.c:1855)
==13273==    by 0x794213: ira_build (ira-build.c:2994)
==13273==    by 0x78D4DE: ira (ira.c:3175)
==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
==13273==    by 0xB110B9: cgraph_finalize_compilation_unit (cgraphunit.c:1096)
==13273==    by 0x509113: c_write_global_declarations (c-decl.c:9872)
==13273==  Uninitialised value was created by a heap allocation
==13273==    at 0x4C26F30: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13273==    by 0x10BD427: xmalloc (xmalloc.c:147)
==13273==    by 0x79264C: remove_unnecessary_regions (ira-build.c:1835)
==13273==    by 0x794213: ira_build (ira-build.c:2994)
==13273==    by 0x78D4DE: ira (ira.c:3175)
==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
==13273== 
==13273== Invalid write of size 1
==13273==    at 0x792776: remove_unnecessary_regions (ira-build.c:1855)
==13273==    by 0x794213: ira_build (ira-build.c:2994)
==13273==    by 0x78D4DE: ira (ira.c:3175)
==13273==    by 0x78F51F: rest_of_handle_ira (ira.c:3344)
==13273==    by 0x7F9C45: execute_one_pass (passes.c:1556)
==13273==    by 0x7F9F34: execute_pass_list (passes.c:1611)
==13273==    by 0x7F9F46: execute_pass_list (passes.c:1612)
==13273==    by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422)
==13273==    by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576)
==13273==    by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733)
==13273==    by 0xB110B9: cgraph_finalize_compilation_unit (cgraphunit.c:1096)
==13273==    by 0x509113: c_write_global_declarations (c-decl.c:9872)
==13273==  Address 0x3c is not stack'd, malloc'd or (recently) free'd
==13273== 
testcase.c: In function 'foo':
testcase.c:1:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to