From 9151880046eb1e92435d662106fbca031e85ffd4 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Sat, 2 Jun 2018 14:28:43 -0500 Subject: [PATCH] Disable tree-vrp on GCC for this function. GCC miscompiles it. --- gfx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx.cpp b/gfx.cpp index 46ec51a3..df70a885 100644 --- a/gfx.cpp +++ b/gfx.cpp @@ -997,6 +997,8 @@ static void SetupOBJ (void) IPPU.OBJChanged = FALSE; } +#pragma GCC push_options +#pragma GCC optimize ("no-tree-vrp") static void DrawOBJS (int D) { void (*DrawTile) (uint32, uint32, uint32, uint32) = NULL; @@ -1089,6 +1091,8 @@ static void DrawOBJS (int D) } } } +#pragma GCC pop_options + static void DrawBackground (int bg, uint8 Zh, uint8 Zl) {