title: Not sure where the segmentation fault lies during reading the data file in Fortran-based code (GNU Fortran Compiler )
body: <pre><code>  program main
    implicit none
    double precision,dimension(101):: p,q
    integer:: i,j
    write(*,*) "Hello World!"
    open(10,file='C:\Users\ACER\Desktop\test\results_analytical.dat',status='old',action='read')
    do i=1,101
      read(10,1) p(i),q(i)
    end do
    1 format(1f14.10,1f14.10,1f14.10)
    close(10)
    do j=1,10
      write(*,*) p(j),q(j)
    end do
    end program main
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
  
  Backtrace for this error:
  #0  ffffffff
  </code></pre>
  
  <p>The input data file is of the format as follows: </p>
  
  <pre><code>  0.0000000000  0.0000000000
    0.0050000000  0.0000000000
    0.0100000000  0.0000000000
    0.0150000000  0.0000000000
    0.0200000000  0.0000000000
    0.0250000000  0.0000000000
    0.0300000000  0.0000000000
    0.0350000000  0.0000000000
    0.0400000000  0.0000000000
    0.0450000000  0.0000000000
    0.0500000000  0.0000000000
    0.0550000000  0.0000000000
    0.0600000000  0.0000000000
    0.0650000000  0.0000000000
    0.0700000000  0.0000000000
    0.0750000000  0.0000000000
    0.0800000000  0.0000000000
    0.0850000000  0.0000000000
    0.0900000000  0.0000000000
    0.0950000000  0.0000000000
    0.1000000000  0.0000000000
    0.1050000000  0.0000000000
    0.1100000000  0.0000000000
    0.1150000000  0.0000000000
    0.1200000000  0.0000000000
    0.1250000000  0.0000000000
    0.1300000000  0.0000000000
    0.1350000000  0.0000000000
    0.1400000000  0.0000000000
    0.1450000000  0.0000000000
    0.1500000000  0.0000000000
    0.1550000000  0.0000000000
    0.1600000000  0.0000000000
    0.1650000000  0.0000000000
    0.1700000000  0.0000000000
    0.1750000000  0.0000000000
    0.1800000000  0.0000000000
    0.1850000000  0.0000000000
    0.1900000000  0.0000000000
    0.1950000000  0.0000000000
    0.2000000000  0.0000000000
    0.2050000000  0.0000000000
    0.2100000000  0.0000000000
    0.2150000000  0.0000000000
    0.2200000000  0.0000000000
    0.2250000000  0.0000000000
    0.2300000000  0.0000000000
    0.2350000000  0.0000000000
    0.2400000000  0.0000000000
    0.2450000000  0.0000000000
    0.2500000000  0.0000000000
    0.2550000000  0.0000000000
    0.2600000000  0.0000000000
    0.2650000000  0.0000000000
    0.2700000000  0.0000000000
    0.2750000000  0.0000014003
    0.2800000000  0.0000266683
    0.2850000000  0.0000507647
    0.2900000000  0.0000740585
    0.2950000000  0.0000970128
    0.3000000000  0.0001201538
    0.3050000000  0.0001440525
    0.3100000000  0.0001693017
    0.3150000000  0.0001964696
    0.3200000000  0.0002260195
    0.3250000000  0.0002582002
    0.3300000000  0.0002929297
    0.3350000000  0.0003297011
    0.3400000000  0.0003675440
    0.3450000000  0.0004050610
    0.3500000000  0.0004405502
    0.3550000000  0.0004722162
    0.3600000000  0.0004985024
    0.3650000000  0.0005186747
    0.3700000000  0.0005340630
    0.3750000000  0.0005510280
    0.3800000000  0.0005882177
    0.3850000000  0.0006938665
    0.3900000000  0.0009852838
    0.3950000000  0.0017346217
    0.4000000000  0.0035456488
    0.4050000000  0.0076987516
    0.4100000000  0.0167869702
    0.4150000000  0.0358201663
    0.4200000000  0.0740223065
    0.4250000000  0.1475576152
    0.4300000000  0.2833478844
    0.4350000000  0.5239305456
    0.4400000000  0.9329151358
    0.4450000000  1.6000355928
    0.4500000000  2.6441689288
    0.4550000000  4.2122092484
    0.4600000000  6.4716450046
    0.4650000000  9.5953727968
    0.4700000000 13.7388232959
    0.4750000000 19.0117014841
    0.4800000000 25.4490137475
    0.4850000000 32.9877526571
    0.4900000000 41.4558123539
    0.4950000000 50.5779426954
    0.5000000000 59.9999992531
  </code></pre>