------- Comment #29 from schwab at suse dot de 2009-01-20 16:30 ------- (In reply to comment #27) > This patch for sim: > Index: sim/ppc/gen-idecode.c > =================================================================== > RCS file: /cvs/src/src/sim/ppc/gen-idecode.c,v > retrieving revision 1.4 > diff -u -p -r1.4 gen-idecode.c > --- sim/ppc/gen-idecode.c 19 Jun 2003 18:42:30 -0000 1.4 > +++ sim/ppc/gen-idecode.c 20 Jan 2009 15:48:18 -0000 > @@ -708,11 +708,11 @@ print_run_until_stop_body(lf *file, > } > lf_putstr(file, "int last_cpu;\n"); > if (generate_smp) { > - lf_putstr(file, "int current_cpu;\n"); > + lf_putstr(file, "volatile int current_cpu;\n"); > } > > if ((code & generate_with_icache)) { > - lf_putstr(file, "int cpu_nr;\n"); > + lf_putstr(file, "volatile int cpu_nr;\n"); > lf_putstr(file, "\n"); > lf_putstr(file, "/* flush the icache of a possible break insn */\n"); > lf_putstr(file, "for (cpu_nr = 0; cpu_nr < nr_cpus; cpu_nr++)\n"); > > seems to work for me.
Neither of these volatile qualifiers are necessary for defined operation. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38587