Command line:
g++ -std=c++0x testcase.cpp

---- testcase.cpp ----
void f() { []{}(); }
----------------------
valgrind shows uninitialised read with this testcase

Tested revisions:
r157675 - fail

Valgrind output:
$ valgrind --trace-children=yes -q /mnt/svn/gcc-trunk/binary-157675-lto/bin/g++
-std=c++0x testcase.cpp 
==11819== Conditional jump or move depends on uninitialised value(s)
==11819==    at 0x4D59C8: grokfndecl (decl.c:6657)
==11819==    by 0x4DC9E2: grokdeclarator (decl.c:9301)
==11819==    by 0x4DDD52: grokmethod (decl.c:12657)
==11819==    by 0x578109: cp_parser_lambda_expression (parser.c:7409)
==11819==    by 0x56BA6E: cp_parser_primary_expression (parser.c:3344)
==11819==    by 0x5802BA: cp_parser_postfix_expression (parser.c:4741)
==11819==    by 0x569BE7: cp_parser_unary_expression (parser.c:5667)
==11819==    by 0x571A27: cp_parser_binary_expression (parser.c:6337)
==11819==    by 0x571F2A: cp_parser_assignment_expression (parser.c:6548)
==11819==    by 0x5722B9: cp_parser_expression (parser.c:6694)
==11819==    by 0x5727DB: cp_parser_expression_statement (parser.c:7809)
==11819==    by 0x564145: cp_parser_statement (parser.c:7674)
==11819==


-- 
           Summary: uninitialised read in grokfndecl() with lambda functions
                    cause -fcompare-debug failures
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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

Reply via email to