/* { dg-do compile } */ /* { dg-options "-O3 -mno-branch-predictions -mbranch-predictions-threshold=60 -mcpu=970" } */ #include int main (int argc, char **argv) { int DIM1 = 2; int DIM2 = 3; int DIM3 = 2; char M[2][3] = { { 'a' , 'b', 'c' }, { 'd' , 'e', 'f' } }; char N[3][2] = { { 'g' , 'h' } , { 'i' , 'j' } , { 'k' , 'l' } }; char P[DIM1][DIM3][20]; int R[DIM1][DIM3]; char tmp_string[4]; char *tmp_string2 = (char *) malloc(20*sizeof(char)); int a, b, c; int do_as_numbers; char tempc; printf ("Would you rather have the matrix data treated as characters?"); tempc = fgetc(stdin); if ((tempc == 'Y') || (tempc == 'y')) do_as_numbers = 0; else do_as_numbers = 1; if (do_as_numbers) { for (a=0; a < DIM1; a++) for (b=0; b < DIM3; b++) R[a][b] = 0; } else { /* Initialize P: Allocate space for the strings; initialize them to empty string */ fprintf (stdout, "Initializing character result matrix.\n"); for (a=0; a 10) for (i = 0; i < count; ++i) pcb += i; else for (i = 0; i < count; ++i) pca += i; *pca = *pcb; } /* { dg-final { scan-assembler-not "bdnz\\+\\+" } } */ /* { dg-final { scan-assembler-not "bne\\+" } } */ /* { dg-final { scan-assembler-not "bge-" } } */