From 510c6c894a99adc19d41c6bc1a578a31d5da6b2c Mon Sep 17 00:00:00 2001 From: Jimmy Kwa Date: Mon, 14 Nov 2011 14:40:38 -0800 Subject: fixed memory error in decuda_to_ptxplus that was causing the type modifier for constants to not appear in some cases. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 10931] --- decuda_to_ptxplus/decuda.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'decuda_to_ptxplus/decuda.y') diff --git a/decuda_to_ptxplus/decuda.y b/decuda_to_ptxplus/decuda.y index 9c8a5e7..0b297f8 100644 --- a/decuda_to_ptxplus/decuda.y +++ b/decuda_to_ptxplus/decuda.y @@ -313,10 +313,10 @@ constMemoryStatements : constMemoryStatement constMemoryStatement : POUND constMemoryTypes constMemoryList { g_instList->setConstMemoryType($2); } NEWLINE -constMemoryTypes : DDOTU32 { char tempString[5]; +constMemoryTypes : DDOTU32 { char* tempString = new char[5]; strcpy(tempString, ".u32"); $$ = tempString; } - | DDOTF32 { char tempString[5]; + | DDOTF32 { char* tempString = new char[5]; strcpy(tempString, ".f32"); $$ = tempString; } ; -- cgit v1.3