delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/04/09/12:16:03

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <001501bfa247$0e2b26f0$ee0348c1@zeus>
From: "Roberto Boldini" <boldini AT dial DOT eunet DOT ch>
To: <cygwin AT sourceware DOT cygnus DOT com>
Subject: Bug in gcc and g++ compilers.
Date: Sun, 9 Apr 2000 19:14:05 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700

------=_NextPart_000_0011_01BFA257.C5990EA0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0012_01BFA257.C5990EA0"


------=_NextPart_001_0012_01BFA257.C5990EA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Dear Sirs,

I recently downloaded Cygwin B20 (beta 20.1) from your web site
and I thank you very much for your phantastic work.
The downloaded setup file is full.exe version 2.02.001.
I installed the downloaded software and everything runs
well. Yesterday, I tried to compile the file ivp.c attached to
this mail message.

gcc ivp.c produces a ./a.exe file. When I try to run it, bash
answers "permission denied". When I try to run it from NT's
command shell cmd.exe, cmd.exe answers "not a NT application"
in a modal dialog and then prints "access denied" on its own
window.

g++ ivp.c (same file) takes a lot to compile. It seems that the =
assembler
is responsible for that (as.exe takes a lot of CPU time).
After a minute or more g++ terminates with the following message.
C:\TEMP\cc6JXrCu.s: Assembler messages:
C:\TEMP\cc6JXrCu.s:485: Fatal error: Cannot write to output file.

When you modify the source code by replacing
#define dt  ((double) 1.0e-8)
with
#define dt  ((double) 0.05)
everything works fine. It seems the compiler.

Yours sincerely, Roberto

------=_NextPart_001_0012_01BFA257.C5990EA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3612.1706"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Dear Sirs,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>I recently downloaded Cygwin B20 =
(beta 20.1)=20
from your web site</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>and I thank =
you very much=20
for your phantastic work.</FONT></DIV>
<DIV><FONT size=3D2>The downloaded setup file is full.exe version=20
2.02.001.</FONT></DIV>
<DIV><FONT size=3D2>I installed the downloaded software and everything=20
runs</FONT></DIV>
<DIV><FONT size=3D2>well. Yesterday, I tried to compile the file ivp.c =
attached=20
to</FONT></DIV>
<DIV><FONT size=3D2>this </FONT><FONT size=3D2>mail =
message.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>gcc ivp.c produces a ./a.exe file. =
When I try to=20
run it, bash</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>answers &quot;permission =
denied&quot;. When I=20
try to run it from NT's</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>command shell cmd.exe, cmd.exe =
answers &quot;not=20
a NT application&quot;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>in a modal dialog and then prints =
&quot;access=20
denied&quot; on its own</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>window.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>g++ ivp.c (same file) takes a lot to =
compile. It=20
seems that the assembler</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>is responsible for that (as.exe =
takes a lot of=20
CPU time).</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>After a minute or more g++ =
terminates with the=20
following message.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>C:\TEMP\cc6JXrCu.s: Assembler=20
messages:<BR>C:\TEMP\cc6JXrCu.s:485: Fatal error: Cannot write to output =

file.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>When you modify the source code by=20
replacing</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>#define dt&nbsp; ((double) =
1.0e-8)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>with</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>#define dt&nbsp; ((double) =
0.05)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>everything works fine. It seems the=20
compiler.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Yours sincerely, Roberto</FONT></DIV></BODY></HTML>

------=_NextPart_001_0012_01BFA257.C5990EA0--

------=_NextPart_000_0011_01BFA257.C5990EA0
Content-Type: application/octet-stream;
	name="ivp.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="ivp.c"

#include <math.h>
#include <stdio.h>


#define F(t)	((t) + 1.0 / (1.0 - (t)))
#define f(t, u)	(1.0 + ((t) -(u)) * ((t) - (u)))


#define t0	((double) 2.0)
#define t1 	((double) 3.0)
#define dt 	((double) 1.0e-8)
#define u0 	((double) 1.0)
#define n	(1 + (int) ((t1 - t0) / dt))


double t[n];
double y[n];
double u[n];


void init()
{
	int i;
=09
	t[0] =3D t0;
	y[0] =3D F(t0);

	for (i=3D1; i<n; ++i)
	{
		t[i] =3D t[i-1] + dt;
		y[i] =3D F(t[i]);
	}
}


void euler()
{
	int i;

	u[0] =3D u0;

	for (i=3D1; i<n; ++i)
		u[i] =3D u[i-1] + dt * f(t[i-1], u[i-1]);
}


void runge_kutta()
{
	int i;

	u[0] =3D u0;

	for (i=3D1; i<n; ++i)
	{
		double k0 =3D dt * f(t[i-1], u[i-1]);
		double k1 =3D dt * f(t[i-1] + dt/2.0, u[i-1] + k0/2.0);
		double k2 =3D dt * f(t[i-1] + dt/2.0, u[i-1] + k1/2.0);
		double k3 =3D dt * f(t[i], u[i-1]+k2);
		u[i] =3D u[i-1] + (k0 + 2.0*k1 + 2.0*k2 + k3) / 6.0;
	}
}

void print()
{
	int i;

	printf("i    \tt                     \ty                     \tu        =
             \te                     \n"
	       =
"-----\t----------------------\t----------------------\t-----------------=
-----\t----------------------\n");

	for (i=3D0; i<n; ++i)
		printf("%05d\t%+.15e\t%+.15e\t%+.15e\t%+.15e\n", i, t0+i*dt, y[i], =
u[i], y[i]-u[i]);
}


int main()
{
	init();
	euler();
	print();
	runge_kutta();
	print();
	return 0;
}


------=_NextPart_000_0011_01BFA257.C5990EA0
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------=_NextPart_000_0011_01BFA257.C5990EA0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019