Bug 25197 - g++ compilation gives bad executable.
Summary: g++ compilation gives bad executable.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-29 17:34 UTC by David
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-01-30 21:32:36 UTC
Embargoed:


Attachments (Terms of Use)

Description David 2001-01-29 17:34:46 UTC
#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 21:32:31 UTC
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 13:01:31 UTC
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.