<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — 32 bit executable fails, 64 bit fine]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=541&amp;type=atom" />
	<updated>2016-03-14T02:44:12Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=541</id>
		<entry>
			<title type="html"><![CDATA[Re: 32 bit executable fails, 64 bit fine]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2435#p2435" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>jeff wrote:</cite><blockquote><div class="quotebox"><cite>baf1 wrote:</cite><blockquote><p>Starting with Fortran 2003, allocate on assign is allowed.</p></blockquote></div><br /><p>If it is being backported to 5.3, it will be integrated when/if 5.3.1 is released.&nbsp; We have a policy of only shipping release versions of GNU Fortran. Thank you for seeing that the bug is fixed, though!</p></blockquote></div><br /><p>OK, that likely means waiting until 6.1 is released in a few months.</p>]]></content>
			<author>
				<name><![CDATA[baf1]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3660</uri>
			</author>
			<updated>2016-03-14T02:44:12Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2435#p2435</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 32 bit executable fails, 64 bit fine]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2434#p2434" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>baf1 wrote:</cite><blockquote><p>Starting with Fortran 2003, allocate on assign is allowed.</p></blockquote></div><p>Ah, I wasn&#039;t aware of that addition to the standard.&nbsp; I can&#039;t say that I agree with it, though, but the Fortran standards committee always seems to make odd decisions.</p><p>If it is being backported to 5.3, it will be integrated when/if 5.3.1 is released.&nbsp; We have a policy of only shipping release versions of GNU Fortran. Thank you for seeing that the bug is fixed, though!</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2016-03-13T13:45:48Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2434#p2434</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 32 bit executable fails, 64 bit fine]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2433#p2433" />
			<content type="html"><![CDATA[<p>Jeff</p><p>The gfortran developers confirm that this is a bug in gfortran which they believe (hope) has been fixed in a very recent set of patches submitted to both the 6.0 branch and backported to the 5-branch.&nbsp; Perhaps you will have a chance in the not-to-distant future to rebuild gfortran from the most recent 5.3.1 sources.</p>]]></content>
			<author>
				<name><![CDATA[baf1]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3660</uri>
			</author>
			<updated>2016-03-13T03:53:36Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2433#p2433</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 32 bit executable fails, 64 bit fine]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2432#p2432" />
			<content type="html"><![CDATA[<p>Other programmers and the Intel compiler agree with me that the code is standards conforming.&nbsp; Likely a gfortran bug, although odd that it only occurs with the 32bit executable.&nbsp; I am assuming you build gcc/gfortran all at once from the same source.&nbsp; I filed a gfortran bug report on bugzilla.</p>]]></content>
			<author>
				<name><![CDATA[baf1]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3660</uri>
			</author>
			<updated>2016-03-13T00:02:48Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2432#p2432</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 32 bit executable fails, 64 bit fine]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2431#p2431" />
			<content type="html"><![CDATA[<p>Jeff</p><p>No, I do not believe you are correct.&nbsp; Starting with Fortran 2003, allocate on assign is allowed.&nbsp; However, I will check further on this.</p>]]></content>
			<author>
				<name><![CDATA[baf1]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3660</uri>
			</author>
			<updated>2016-03-12T22:08:35Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2431#p2431</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 32 bit executable fails, 64 bit fine]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2430#p2430" />
			<content type="html"><![CDATA[<p>You&#039;re probably seeing the crash because you&#039;re assigning values to <strong>s</strong>, an allocatable array, without first allocating it.&nbsp; If you were to allocate first, it should work on both:</p><div class="codebox"><pre><code>program defer
  implicit none
  character(len=:), dimension(:), allocatable::s

  allocate(character(len=3)::s(3))

  s(1) = &quot;a12&quot;
  s(2) = &quot;ab3&quot;
  s(3) = &quot;abc&quot;
  write(*,*)&quot;shape of s: &quot;,shape(s)
end program defer</code></pre></div><p>The fact that it works on 64-bit is incidental.&nbsp; In reality, you&#039;re overwriting an undefined area of memory and luckily getting away with it.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2016-03-12T21:35:31Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2430#p2430</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[32 bit executable fails, 64 bit fine]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2429#p2429" />
			<content type="html"><![CDATA[<p>This may be a gcc/gfortran library bug, but might be something related to your build of gfortran.&nbsp; The program below crashes with </p><p>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br />Backtrace for this error:<br />#0&nbsp; ffffffff</p><p>when building with 32 bit architecture selected (-m32 flag), but executes correctly without error when 64 bit is selected.</p><p>program defer<br />&nbsp; implicit none<br />&nbsp; character(len=:), dimension(:), allocatable::s<br />&nbsp; s=[&quot;a12&quot;,&quot;ab3&quot;,&quot;abc&quot;]<br />&nbsp; write(*,*)&quot;shape of s: &quot;,shape(s)<br />end program defer</p>]]></content>
			<author>
				<name><![CDATA[baf1]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3660</uri>
			</author>
			<updated>2016-03-12T19:33:11Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2429#p2429</id>
		</entry>
</feed>
