diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-16 11:39:04 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-16 11:39:04 -0700 |
commit | ab6452296324f9827b07780c90847a69f2173ed8 (patch) | |
tree | 0e24becd8f51e8192e4b01f8ad8a7a0eddbc64e3 /tests/aniso.c | |
parent | 52f2d45d070342b82dee9fcac325b8535f3adc65 (diff) |
generate separate function table wrappers for a single library function aliased with different signatures
Diffstat (limited to 'tests/aniso.c')
-rw-r--r-- | tests/aniso.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/aniso.c b/tests/aniso.c index 1126265e..f210e5a5 100644 --- a/tests/aniso.c +++ b/tests/aniso.c @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) for (int x = 0; x < n; x++) { int start = x*w*2; glBegin( GL_TRIANGLES ); - glTexCoord2i( 1, 0 ); glVertex3f( start , 0, 0 ); + glTexCoord2i( 1, 0 ); glVertex2i( start , 0 ); glTexCoord2i( 0, 0 ); glVertex3f( start+w, 300, 0 ); glTexCoord2i( 1, 1 ); glVertex3f( start-w, 300, 0 ); glEnd(); @@ -209,5 +209,11 @@ int main(int argc, char *argv[]) SDL_Quit(); - return 0; + // check for asm compilation bug with aliased functions with different sigs + void (*f)(int, int) = glVertex2i; + if ((int)f % 16 == 4) f(5, 7); + void (*g)(int, int) = glVertex3f; + if ((int)g % 16 == 4) g(5, 7); + return (int)f + (int)g; } + |