URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 384 |
// { dg-do assemble }
|
// { dg-do assemble }
|
// GROUPS passed arg-matching
|
// GROUPS passed arg-matching
|
// arg-matching file
|
// arg-matching file
|
// Message-Id: <199405132049.QAA06835@elan.cs.UMD.EDU>
|
// Message-Id: <199405132049.QAA06835@elan.cs.UMD.EDU>
|
// Subject: Bug in g++ 2.4.5 and 2.5.8
|
// Subject: Bug in g++ 2.4.5 and 2.5.8
|
// Date: Fri, 13 May 1994 16:49:22 -0400
|
// Date: Fri, 13 May 1994 16:49:22 -0400
|
// From: Evan Rosser
|
// From: Evan Rosser
|
|
|
#include
|
#include
|
#include
|
#include
|
#include
|
#include
|
|
|
class TupleIterator {
|
class TupleIterator {
|
public:
|
public:
|
TupleIterator(int *tpl);
|
TupleIterator(int *tpl);
|
int& operator*();
|
int& operator*();
|
int live() const;
|
int live() const;
|
// The compile fails with "no post-increment operator for type" at "TI++"
|
// The compile fails with "no post-increment operator for type" at "TI++"
|
// below.
|
// below.
|
// It succeeds with the same declarations if set_position does not take an int.
|
// It succeeds with the same declarations if set_position does not take an int.
|
// This occurs with G++ 2.4.5 and 2.5.8.
|
// This occurs with G++ 2.4.5 and 2.5.8.
|
// Sun CC works OK with either case.
|
// Sun CC works OK with either case.
|
void operator++(int);
|
void operator++(int);
|
void set_position(int);
|
void set_position(int);
|
private:
|
private:
|
};
|
};
|
|
|
int main() {
|
int main() {
|
|
|
int t[5];
|
int t[5];
|
t[1] = 1; t[2] = 2;t[3] = 3;t[4] = 4;
|
t[1] = 1; t[2] = 2;t[3] = 3;t[4] = 4;
|
TupleIterator TI(t);
|
TupleIterator TI(t);
|
|
|
while(TI.live()){
|
while(TI.live()){
|
printf("%d", *TI);
|
printf("%d", *TI);
|
TI++;
|
TI++;
|
}
|
}
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.