From mint-bounce@lists.fishpool.fi Mon Oct 26 10:01:01 2009 Date: Mon, 26 Oct 2009 15:51:33 +0200 From: "ggn (HOL)" X-Priority: 3 (Normal) Message-ID: <563767069.20091026155133@hol.gr> To: "mint@lists.fishpool.fi" Subject: [MiNT] g++ bug or is my build enviroment not sane? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------275742A2F381C" X-Virus-Scanned: ClamAV 0.94.2/9940/Mon Oct 26 03:47:14 2009 on takeit02.mail.dc.hol.net X-Virus-Status: Clean X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: ggn@hol.gr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: ------------275742A2F381C Content-Type: text/plain; charset=windows-1253 Content-Transfer-Encoding: quoted-printable Hello, Recently a friend wanted to compile a c++ program he has written on the = PC to his Falcon. After a bit of digging around we managed to compile the pr= ogram successfully, but we noticed something weird: turning on -O2 while comp= iling resulted in only the first console input (read by cin) to be read, whil= e the rest were read as blank (presumably, you don't get a chance to = enter anything). I sat down and reduced the code to a fragment that isolates this behavio= r and attached it here. It compiles and works fine on my Mingw installation. The test machines are a Falcon with CT63 installed, and a PC running l= atest aranym. Both machines have Mikro's 4.4.1 gcc port and 2.19.1 binutils.= Also both machines have latest mintlib installed (from alan's site). And, = to be absolutely sure, I recompiled mintlib from CVS yesterday and retested wit= h the same results. Is this a known g++ bug, is my build enviroment(s) problematic, or is = there something wrong with the code? (If it's the last, many apologies :)) --=20 Best regards, ggn mailto:ggn@hol.gr ------------275742A2F381C Content-Type: application/octet-stream; name="testme.cpp" Content-transfer-encoding: base64 Content-Disposition: attachment; filename="testme.cpp" I2luY2x1ZGUgPGlvc3RyZWFtPg0KDQp1c2luZyBuYW1lc3BhY2Ugc3RkOw0KDQppbnQgbWFp bih2b2lkKQ0Kew0KDQogICAgLy9Vc2VyIGlucHV0IGZvciByb3dzIGFuZCBjb2x1bW5zIG9m IHRoZSBhcnJheQ0KICAgIGludCByb3dzLCBjb2xzLCBwYXJ0aWNsZXMsIHN0b2ljaDsNCiAg ICBkb3VibGUgc3RpY2t5Ow0KICAgIGNvdXQ8PCJHaXZlIG51bWJlciBvZiByb3dzIChHcmVh dGVyIHRoYW4gMTAwKSI8PGVuZGw7DQogICAgY2luPj5yb3dzOw0KICAgIGNvdXQ8PCJHaXZl IG51bWJlciBvZiBjb2xzIChHcmVhdGVyIHRoYW4gMTAwKSI8PGVuZGw7DQogICAgY2luPj5j b2xzOw0KDQogICAgLy9Vc2VybiBpbnB1dCBmb3IgdGhlIG51bWJlciBvZiBwYXJ0aWNsZXMg dG8gc3RpY2sNCiAgICBjb3V0PDwiR2l2ZSBudW1iZXIgb2YgYXRvbXMiPDxlbmRsOw0KICAg IGNpbj4+cGFydGljbGVzOw0KDQogICAgLy9Vc2VyIGlucHV0IGZvciB0aGUgc3RpY2t5IGNv ZWZmaWNpZW50DQogICAgY291dDw8IkdpdmUgc3RpY2t5IGNvZWZmaWNpZW50Ijw8ZW5kbDsN CiAgICBjaW4+PnN0aWNreTsNCg0KICAgIC8vVXNlciBpbnB1dCBmb3Igc3RvaWNoaW9tZXRy eS4NCiAgICBjb3V0PDwiR2l2ZSBzdG9pY2hpb21ldHJ5IGZhY3RvciAwLTEwMCI8PGVuZGw7 DQogICAgY2luPj5zdG9pY2g7DQoNCg0KDQogICAgcmV0dXJuIDA7DQp9DQoNCg== ------------275742A2F381C--