diff --git a/gen/asmstmt.cpp b/gen/asmstmt.cpp index 2355ca4f..dc5c7c58 100644 --- a/gen/asmstmt.cpp +++ b/gen/asmstmt.cpp @@ -162,6 +162,9 @@ Statement *AsmStatement::semantic(Scope *sc) //puts(toChars()); +#if DMDV1 + sc->func->inlineAsm = true; +#endif sc->func->hasReturnExp |= 8; sc->func->inlineStatus = ILSno; // %% not sure diff --git a/gen/toir.cpp b/gen/toir.cpp index cede55ce..fdcb7930 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -2755,7 +2755,7 @@ DValue* StructLiteralExp::toElem(IRState* p) #endif else { - if (vd->init->isVoidInitializer()) + if (vd->init && vd->init->isVoidInitializer()) continue; IF_LOG Logger::println("using default initializer"); cv.c = get_default_initializer(vd, NULL);