* return-nodebug.c: Don't include stdio.h.
(init): Delete. (func): Delete definition and provide extern declaration. (t): New. (main): Don't call printf. Call func and store its result in t. * return-nodebug1.c: New. * return-nodebug.exp: Don't expect stdio output. Instead, print the global variable t. Drop printf formatters and cast types from foreach loop. Don't use prepare_for_testing. Compile return-nodebug.c and return-nodebug1.c in separate steps. Don't define FORMAT or CAST.
This commit is contained in:
parent
42e5fcbf34
commit
51272cf2e9
4 changed files with 70 additions and 32 deletions
|
@ -15,34 +15,20 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static TYPE
|
||||
init (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static TYPE
|
||||
func (void)
|
||||
{
|
||||
return 31;
|
||||
}
|
||||
extern TYPE func (void);
|
||||
|
||||
static void
|
||||
marker (void)
|
||||
{
|
||||
}
|
||||
|
||||
TYPE t;
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
/* Preinitialize registers to 0 to avoid false PASS by leftover garbage. */
|
||||
init ();
|
||||
t = func ();
|
||||
|
||||
printf ("result=" FORMAT "\n", CAST func ());
|
||||
|
||||
/* Cannot `next' with no debug info. */
|
||||
marker ();
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue