I noticed this while looking at dependency violations that occur during a gcc bootstrap. We get two in the libgcc build, both are due to the same problem. Here is a testcase extracted from libgcc/soft-float/fixunstfti.c. int sub (int i) { float tmp; if (i) __asm__ __volatile__ ("frcpa.s0 %0,p1=f0,f0" \ : "=f" (tmp) : : "p1" ); \ return i + 10; } Compiling this with -O2 gives a DV error because there is a missing stop bit after the asm. The assembler code has #APP // 6 "tmp.c" 1 frcpa.s0 f6,p1=f0,f0 // 0 "" 2 #NO_APP .L2: .mib adds r8 = 10, r32 mov pr = r2, -1 br.ret.sptk.many b0
The problem is in rtx_needs_barrier in config/ia64/ia64.c, which has case CLOBBER: case USE: /* Clobber & use are for earlier compiler-phases only. */ break; I think this was written in the olden days when we still had reg-no-conflict blocks and libcall blocks and other stuff that would insert naked clobbers into the rtl stream. These should be ignored, but I don't think that they will occur anymore. However, it isn't safe to ignore a clobber inside a parallel, particularly when that parallel is for an extended asm. This is a serious problem that needs to be fixed. The problem can be worked around by using -mvolatile-asm-stop, but this obviously only works for volatile asms. -- Summary: IA-64 asm clobbers are ignored Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wilson at gcc dot gnu dot org GCC target triplet: ia64-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43897