Skip to content

Commit

Permalink
[Tests] Fix test failure from clang optimizing out math causing SIGPFE.
Browse files Browse the repository at this point in the history
  • Loading branch information
marsupial committed Jan 24, 2017
1 parent 2b6d2e8 commit 37911d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pxr/base/lib/tf/testenv/SIGFPE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ main(int argc, char **argv)
// as we leave them off by default.
TfInstallTerminateAndCrashHandlers();

int a = 1;
int b = 0;
// Avoid compiler doing the constant math expression
volatile int a = 1;
volatile int b = 0;
int c = a/b;
printf("%d",c);
}
Expand Down

0 comments on commit 37911d7

Please sign in to comment.