This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/53696] New: [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda


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

             Bug #: 53696
           Summary: [4.7/4.8 Regression] ICE: SIGSEGV in
                    gimplify_decl_expr (gimplify.c:1454) with
                    -fkeep-inline-functions on invalid use of lambda
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 27631
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27631
preprocessed source

Compiler output:
$ gcc -fkeep-inline-functions testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C 
testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C: In function 'void foo(A&)':
testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C:8:3: error: invalid use of
incomplete type 'struct A'
   [=](){a;};      // { dg-error "invalid use of incomplete type" }
   ^
testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C:4:8: error: forward declaration of
'struct A'
 struct A;         // { dg-error "forward declaration" }
        ^
testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C:8:11: warning: lambda expressions
only available with -std=c++11 or -std=gnu++11 [enabled by default]
   [=](){a;};      // { dg-error "invalid use of incomplete type" }
           ^
testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C: In lambda function:
testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C:8:9: internal compiler error:
Segmentation fault
   [=](){a;};      // { dg-error "invalid use of incomplete type" }
         ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


(gdb) bt
#0  0x00000000009e3961 in gimplify_decl_expr (seq_p=0x7fffffffd1b8,
stmt_p=0x7ffff5bf0b20) at /mnt/svn/gcc-trunk/gcc/gimplify.c:1454
#1  gimplify_expr (expr_p=0x7ffff5bf0b20, pre_p=0x7fffffffd1b8,
post_p=0x7fffffffcf18, gimple_test_f=<optimized out>, fallback=<optimized out>)
    at /mnt/svn/gcc-trunk/gcc/gimplify.c:7312
#2  0x00000000009e6627 in gimplify_stmt (stmt_p=<optimized out>,
seq_p=0x7fffffffd1b8) at /mnt/svn/gcc-trunk/gcc/gimplify.c:5678
#3  0x00000000009e138c in gimplify_statement_list (pre_p=0x7fffffffd1b8,
expr_p=0x7ffff5bf9060) at /mnt/svn/gcc-trunk/gcc/gimplify.c:1528
#4  gimplify_expr (expr_p=0x7ffff5bf9060, pre_p=0x7fffffffd1b8,
post_p=0x7fffffffd098, gimple_test_f=<optimized out>, fallback=<optimized out>)
    at /mnt/svn/gcc-trunk/gcc/gimplify.c:7531
#5  0x00000000009e6627 in gimplify_stmt (stmt_p=<optimized out>,
seq_p=0x7fffffffd1b8) at /mnt/svn/gcc-trunk/gcc/gimplify.c:5678
#6  0x00000000009e75b4 in gimplify_bind_expr (expr_p=0x7ffff5be7598,
pre_p=<optimized out>) at /mnt/svn/gcc-trunk/gcc/gimplify.c:1222
#7  0x00000000009e1bad in gimplify_expr (expr_p=0x7ffff5be7598,
pre_p=0x7fffffffd3a8, post_p=0x7fffffffd288, gimple_test_f=<optimized out>, 
    fallback=<optimized out>) at /mnt/svn/gcc-trunk/gcc/gimplify.c:7316
#8  0x00000000009e6627 in gimplify_stmt (stmt_p=<optimized out>,
seq_p=0x7fffffffd3a8) at /mnt/svn/gcc-trunk/gcc/gimplify.c:5678
#9  0x00000000009f56a2 in gimplify_body (fndecl=0x7ffff5be7500,
do_parms=<optimized out>) at /mnt/svn/gcc-trunk/gcc/gimplify.c:8177
#10 0x00000000009f5b4e in gimplify_function_tree (fndecl=0x7ffff5be7500) at
/mnt/svn/gcc-trunk/gcc/gimplify.c:8311
#11 0x0000000000854358 in cgraph_analyze_function (node=0x7ffff5a80750) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:652
#12 0x00000000008568cd in cgraph_analyze_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:938
#13 0x0000000000857b31 in finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2086
#14 0x0000000000676a2b in cp_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/cp/decl2.c:4024
#15 0x0000000000b944ac in compile_file () at
/mnt/svn/gcc-trunk/gcc/toplev.c:566
#16 do_compile () at /mnt/svn/gcc-trunk/gcc/toplev.c:1870
#17 toplev_main (argc=14, argv=0x7fffffffd6e8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1946
#18 0x00007ffff61b62ad in __libc_start_main () from /lib64/libc.so.6
#19 0x0000000000597d21 in _start ()


Tested revisions:
r188682 - crash
4.7 r188682 - crash
4.6 r188682 - OK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]