Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 628:e3c46bcce65f

Show
Ignore:
Timestamp:
10/01/08 14:32:12 (3 months ago)
Author:
Christian Kamm <kamm incasoftware de>
Children:

629:607b6b5819a7 630:bc83491463f0

branch:
default
Message:

Detect a missing global before trying to const init it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gen/toir.cpp

    r624 r628  
    129129            if (vd->isDataseg() || (vd->storage_class & STCextern)) { 
    130130                vd->toObjFile(0); // TODO: multiobj 
    131                 DtoConstInitGlobal(vd); 
    132131            } 
    133132            if (!vd->ir.isSet() || !vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) { 
     
    136135                    Logger::cout() << "unresolved global had type: " << *DtoType(vd->type) << '\n'; 
    137136                fatal(); 
     137            } 
     138            if (vd->isDataseg() || (vd->storage_class & STCextern)) { 
     139                DtoConstInitGlobal(vd); 
    138140            } 
    139141            return new DVarValue(type, vd, vd->ir.getIrValue()); 
Copyright © 2008, LDC Development Team.