Bug 25197 - g++ compilation gives bad executable.
g++ compilation gives bad executable.
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-01-29 12:34 EST by David
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-30 16:32:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David 2001-01-29 12:34:46 EST
#code snappet
cerr << "Before IF" << endl;
if ( object->function(paramA) || ( object->function(paramB) ) {
  cerr << "Inside IF" << endl;
  //some more code
  return Avalue;
else {
  cerr << "Inside Else << endl;
  //some other code
  return Bvalue;

When I compile the code on my PC with either g++ (from install or updated
version) and run it all I get is the first "cerr<<"-line and then the
program mysteriesly exits the function (and returns a bad value). When I
compile everything on my colleague's computer (Suse6.4 + gcc/g++ 2.95.2)
everything works fine like it is supposed to do.
Also when trying to find the error I tried gdb and inserted some
break-points. gdb just ignorred them and never breaked. Maybe I should be
filling this bug-report at gnu.org but it is a bug that there is a bad
compiler shipped with a stable distribution
a quick solution to this would maybe provide rpm's of gcc/g++ 2.95.2 (the
latest stable release)
Comment 1 Jakub Jelinek 2001-01-30 16:32:31 EST
Code snippets don't help in debugging compiler issues.
Please provide the whole testcase (if you can trim it down a little
bit the better) after making sure it is still present in the latest
gcc rpm (ideally the one in rawhide, but gcc errata (ie. 2.96-69)
might be enough.
Comment 2 Jakub Jelinek 2001-02-23 08:01:31 EST
If you'll have the whole testcase, please reopen the bug.

Note You need to log in before you can comment on or make changes to this bug.