This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13239] [3.4 regression] Assertion does not seem to work correctly anymore


------- Additional Comments From bangerth at dealii dot org  2003-12-02 23:38 -------
Here's something self-contained: 
----------------------------- 
extern "C" void abort(void); 
 
struct Y { 
  int i; 
}; 
 
bool foo() { return true; } 
Y bar() { Y y = {0}; return y; } 
 
int main() 
{ 
  __builtin_expect (foo() && (bar().i)==0, 0) ? 0 : (abort(),1); 
} 
------------------------ 
This aborts when compiled with SuSE's 3.3.1. It also aborts with our 
present mainline, but not with 3.2.3. So the bug is for real. I'll 
try to figure out whether it is a mainline bug in FSF sources that SuSE 
happened to import into their tree, or if we also have this problem in 
3.3 CVS. 
 
W. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-12-02 23:38:51
               date|                            |
            Summary|[3.3 REGRESSION] Assertion  |[3.4 regression] Assertion
                   |does not seem to work       |does not seem to work
                   |correctly anymore           |correctly anymore
   Target Milestone|---                         |3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13239


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]