2013-08-24 01:53:06 +00:00
|
|
|
/* This testcase is part of GDB, the GNU debugger.
|
|
|
|
|
2014-01-01 03:54:24 +00:00
|
|
|
Copyright 2012-2014 Free Software Foundation, Inc.
|
2013-08-24 01:53:06 +00:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
|
2014-07-01 11:30:54 +00:00
|
|
|
asm (".section \".text\"");
|
|
|
|
asm (".balign 8");
|
|
|
|
asm ("foo_start: .globl foo_start");
|
|
|
|
|
2013-08-24 01:53:06 +00:00
|
|
|
int
|
|
|
|
foo (int i, int j)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-07-01 11:30:54 +00:00
|
|
|
asm ("bar_start: .globl bar_start");
|
|
|
|
|
2013-08-24 01:53:06 +00:00
|
|
|
int
|
|
|
|
bar (int i)
|
|
|
|
{
|
|
|
|
int j = 2;
|
|
|
|
|
|
|
|
return foo (i, j);
|
|
|
|
}
|
|
|
|
|
|
|
|
int global1 = 1;
|
|
|
|
int global2 = 2;
|
|
|
|
|
2013-08-24 01:54:59 +00:00
|
|
|
static void
|
|
|
|
end (void)
|
|
|
|
{}
|
|
|
|
|
2013-08-24 01:53:06 +00:00
|
|
|
int
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
|
|
|
|
global1++;
|
|
|
|
global2++;
|
|
|
|
ret = bar (0);
|
|
|
|
|
2013-08-24 01:54:59 +00:00
|
|
|
end ();
|
2013-08-24 01:53:06 +00:00
|
|
|
return ret;
|
|
|
|
}
|