------- Comment #6 from jvdelisle at gcc dot gnu dot org 2010-08-13 17:24 ------- With or without the other patch, the gimple code has:
main (integer(kind=4) argc, character(kind=1) * * argv) [tx_f90_pointers.f90 : 30:0] { integer(kind=4) D.1535; static integer(kind=4) options.0[8] = {68, 511, 0, 0, 0, 1, 0, 1}; [tx_f90_pointers.f90 : 30:0] _gfortran_set_args (argc, argv); [tx_f90_pointers.f90 : 30:0] _gfortran_set_options (8, [tx_f90_pointers.f90 : 30] &options.0[0]); [tx_f90_pointers.f90 : 30:0] test (); [tx_f90_pointers.f90 : 30:0] D.1535 = 0; [tx_f90_pointers.f90 : 30:0] return D.1535; } test () [tx_f90_pointers.f90 : 3:0] { integer(kind=4) D.1540; integer(kind=4) array1[10]; integer(kind=4) array2[100]; integer(kind=4) i; struct array1_integer(kind=4) p1; struct array1_integer(kind=4) p11; [tx_f90_pointers.f90 : 3:0] p1.data = 0B; [tx_f90_pointers.f90 : 3:0] p11.data = 0B; [tx_f90_pointers.f90 : 12:0] p1.data = 0B; [tx_f90_pointers.f90 : 3:0] i = 1; [tx_f90_pointers.f90 : 3:0] if (i <= 10) goto <D.1537>; else goto <D.1538>; <D.1537>: <D.1539>: [tx_f90_pointers.f90 : 3:0] { logical(kind=4) D.1529; [tx_f90_pointers.f90 : 15:0] D.1540 = i + -1; [tx_f90_pointers.f90 : 15:0] array1[D.1540] = i; L.1: [tx_f90_pointers.f90 : 3:0] D.1529 = i == 10; [tx_f90_pointers.f90 : 3:0] i = i + 1; [tx_f90_pointers.f90 : 3:0] if (D.1529 != 0) goto L.2; else goto <D.1541>; <D.1541>: } [tx_f90_pointers.f90 : 3:0] goto <D.1539>; <D.1538>: L.2: [tx_f90_pointers.f90 : 3:0] p1.dtype = 265; [tx_f90_pointers.f90 : 3:0] p1.dim[0].lbound = 1; [tx_f90_pointers.f90 : 3:0] p1.dim[0].ubound = 5; [tx_f90_pointers.f90 : 3:0] p1.dim[0].stride = -2; [tx_f90_pointers.f90 : 3:0] p1.data = &array1[8]; [tx_f90_pointers.f90 : 3:0] p1.offset = 2; [tx_f90_pointers.f90 : 3:0] p11.dtype = 265; [tx_f90_pointers.f90 : 3:0] p11.dim[0].lbound = 1; [tx_f90_pointers.f90 : 3:0] p11.dim[0].ubound = 5; [tx_f90_pointers.f90 : 3:0] p11.dim[0].stride = 2; [tx_f90_pointers.f90 : 3:0] p11.data = &array1[0]; [tx_f90_pointers.f90 : 3:0] p11.offset = -2; [tx_f90_pointers.f90 : 23:0] i = 1; [tx_f90_pointers.f90 : 3:0] p1.dtype = 265; [tx_f90_pointers.f90 : 3:0] p1.dim[0].lbound = 1; [tx_f90_pointers.f90 : 3:0] p1.dim[0].ubound = 10; [tx_f90_pointers.f90 : 3:0] p1.dim[0].stride = 1; [tx_f90_pointers.f90 : 3:0] p1.data = &array2[0]; [tx_f90_pointers.f90 : 3:0] p1.offset = -1; [tx_f90_pointers.f90 : 28:0] p11 = p1; } The entire DO LOOP is one line. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45186