Opened 4 months ago

#240 new defect

nested anonymous enum fails

Reported by: pabuhr Owned by:
Priority: minor Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

struct S {
    enum { A } v;
};
cfa test.cfa
CFA Version 1.0.0 (debug)
*CFA assertion error* "ret" from program "cfa-cpp" in "T strict_dynamic_cast(const U&) [with T = DeclarationWithType*; U = Declaration*]" at line 49 in file "./include/cassert": enum __anonymous0: with body 1
... with members
  A: const instance of enum __anonymous0 with body 1

Stack back trace for: /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp
(0) /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp : SymTab::StructFuncGenerator::genFieldCtors()+0x58a [0x555556a76ada]
(1) /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp : (/*unknown*/)+0x151ef5a [0x555556a72f5a]
(2) /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp : SymTab::AutogenerateRoutines::previsit(StructDecl*)+0x2ce [0x555556a734ae]
(3) /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp : PassVisitor<SymTab::AutogenerateRoutines>::visit(StructDecl*)+0x89 [0x555556a84f99]
(4) /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp : SymTab::autogenerateRoutines(std::__cxx11::list<Declaration*, std::allocator<Declaration*> >&)+0x13c [0x555556a75f3c]
(5) /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp : SymTab::validate(std::__cxx11::list<Declaration*, std::allocator<Declaration*> >&, bool)+0xd65 [0x555556b09eb5]
(6) /u0/pabuhr/software/mary/cfa-cc/lib/cfa/cfa-cpp : main(/*unknown*/)+0x731 [0x555555c54d81]
CC1 Translator error: stage 2, child failed 6

Change History (0)

Note: See TracTickets for help on using tickets.