Commit dda10672 by Roman Zippel

m68k.exp: New.

	* gcc.target/m68k/m68k.exp: New.
	* gcc.target/m68k/crash1.c: New.

From-SVN: r122521
parent 594f8779
/* { dg-do compile } */
/* { dg-options "-Os -fomit-frame-pointer" } */
/* Caused an ICE because of forgotten auto increment. */
register void *current __asm__("%a2");
struct kernel_stat
{
long long user;
long long nice;
long long system;
long long idle;
long long steal;
unsigned irqs[256];
};
extern struct kernel_stat per_cpu__kstat;
void show_stat(void)
{
int i;
long long user, nice, system, idle, steal;
long long sum = 0;
user = nice = system = idle = steal = 0;
for (i = 0; i < 1; i++)
{
int j;
user = user + per_cpu__kstat.user;
nice = nice + per_cpu__kstat.nice;
system = system + per_cpu__kstat.system;
idle = idle + per_cpu__kstat.idle;
steal = steal + per_cpu__kstat.steal;
for (j = 0 ; j < 256 ; j++)
sum += per_cpu__kstat.irqs[j];
}
seq_printf(user, nice, system, idle, steal);
seq_printf(sum);
for (i = 0; i < 256; i++)
seq_printf (i);
}
# Copyright (C) 1997, 2004, 2006 Free Software Foundation, Inc.
# 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 2 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# GCC testsuite that uses the `dg.exp' driver.
# Exit immediately if this isn't an m68k target.
if ![istarget m68k*-*-*] then {
return
}
# Load support procs.
load_lib gcc-dg.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
set DEFAULT_CFLAGS " -ansi -pedantic-errors"
}
# Initialize `dg'.
dg-init
# Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
"" $DEFAULT_CFLAGS
# All done.
dg-finish
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment