http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59828
Bug ID: 59828 Summary: Broken assembly on ppc* with two -mcpu= options Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org gcc -m32 -O2 -mcpu=750 -mcpu=power7 -c test.c results in assembler complaining: Error: junk at end of line: `1' While the last -mcpu= option wins for compilation flags, when determining gas options to be passed to the assembler rs6000.h uses a sequence matching each -mcpu= individually, and -mcpu=750 is handled there after -mcpu=power7 and thus overrides the power7 ISA in as flags with 750 ISA flags. Don't know the *.opt stuff enough if there is a way even for the -mcpu= etc. options to cancel all previous occurences with different strings from matching, if not, perhaps at least the list in rs6000.h should be sorted such that at least in most cases assembler flags that are superset of others are before flags for the subsets. typedef struct { int channels; void *codec_setup; } vorbis_info; typedef struct vorbis_dsp_state { vorbis_info *vi; float **pcm; long W; void *backend_state; } vorbis_dsp_state; typedef struct vorbis_block { float **pcm; } vorbis_block; typedef struct private_state { int window[2]; } private_state; typedef struct highlevel_byblocktype { long blocksizes[2]; int halfrate_flag; } codec_setup_info; extern float *_vorbis_window_get (int n); void vorbis_synthesis_blockin (vorbis_dsp_state * v, vorbis_block * vb) { vorbis_info *vi = v->vi; codec_setup_info *ci = vi->codec_setup; private_state *b = v->backend_state; int hs = ci->halfrate_flag; int i, j; int n = ci->blocksizes[v->W] >> (hs + 1); int n0 = ci->blocksizes[0] >> (hs + 1); int n1 = ci->blocksizes[1] >> (hs + 1); int thisCenter = 0, prevCenter = 0; for (j = 0; j < vi->channels; j++) { float *w = _vorbis_window_get (b->window[1] - hs); float *pcm = v->pcm[j] + prevCenter; float *p = vb->pcm[j]; for (i = 0; i < n1; i++) pcm[i] = pcm[i] * w[n1 - i - 1] + p[i] * w[i]; float *w2 = _vorbis_window_get (b->window[0] - hs); float *pcm2 = v->pcm[j] + prevCenter; float *p2 = vb->pcm[j] + n1 / 2 - n0 / 2; for (i = 0; i < n0; i++) pcm2[i] = pcm2[i] * w2[n0 - i - 1] + p2[i] * w2[i]; for (; i < n1 / 2 + n0 / 2; i++) pcm2[i] = p2[i]; float *pcm3 = v->pcm[j] + thisCenter; float *p3 = vb->pcm[j] + n; for (i = 0; i < n; i++) pcm3[i] = p3[i]; } }