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]

typeid() problems (Internal compiler error 252 / Assembler errors)



Hi,

I encountered problems when compiling the following piece of C++ source
(I shortened it down to a few lines, converting 'real' statements to
simple function calls of typeid()).

My system:	Linux/GNU, kernel 2.2.10
		gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
		(i.e. standard installation of SuSE Linux 6.2, released
		a few days ago)

The C++ file:
---------------------------------------------------------------------------
#include <typeinfo>


#ifdef ERR1
typedef	char		CHARTYPE;
#else
#define	CHARTYPE	char
#endif

void main ()
{
	typeid(CHARTYPE*);		// ERR1

#ifdef ERR2
	int	len		= 1;
	char	carr[len];
#else
	char	carr[2];
#endif

	typeid(typeof(carr));		// ERR2
	typeid(carr);			// ERR2, too
}
---------------------------------------------------------------------------

The first error occurs when compiling with -DERR1 (using a typedef);
the first line of main()'s body is the place where the error actually
comes up:

x.C: In function `const class type_info & __tfc()':
x.C:25: Internal compiler error 252.
x.C:25: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
x.C:25: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.


The second one occurs with -DERR2 (i.e. using a variable array size); the
call to typeid() in the last two lines of main() is where it happens
(either line triggers the error messages):

x.s: Assembler messages:
x.s:53: Error: Ignoring junk 'Wpl1Wc' after expression
x.s:68: Error: Ignoring junk 'Wpl1Wc' after expression
x.s:83: Error: Expected comma after symbol-name
x.s:83: Error: Rest of line ignored. First ignored character is `*'.
x.s:89: Error: Rest of line ignored. First ignored character is `*'.
x.s:90: Error: ignoring unrecognized symbol type ""
x.s:90: Error: Rest of line ignored. First ignored character is `*'.
x.s:91: Error: invalid character '_' in opcode
x.s:97: Error: Ignoring junk 'Wpl1Wc' after expression
x.s:100: Warning: warning: unrecognized characters `Wpl1Wc' in expression
x.s:105: Warning: warning: unrecognized characters `Wpl1Wc' in expression
x.s:114: Error: expected comma after name `__tfAEE' in .size directive
x.s:114: Error: Rest of line ignored. First ignored character is `*'.
x.s:115: Error: Expected comma after symbol-name
x.s:115: Error: Rest of line ignored. First ignored character is `*'.
x.s:121: Error: Rest of line ignored. First ignored character is `*'.
x.s:122: Error: ignoring unrecognized symbol type ""
x.s:122: Error: Rest of line ignored. First ignored character is `*'.
x.s:123: Error: invalid character '_' in opcode
x.s:129: Error: Ignoring junk 'Wpl1Wc' after expression
x.s:132: Warning: warning: unrecognized characters `Wpl1Wc' in expression
x.s:137: Warning: warning: unrecognized characters `Wpl1Wc' in expression
x.s:146: Error: expected comma after name `__tfAEE' in .size directive
x.s:146: Error: Rest of line ignored. First ignored character is `*'.

When compiling the alternative version (without ERR1/ERR2 being defined)
no errors occur. When compiling with an older g++
	Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.1/specs
	gcc version 2.7.2.1
no errors occur either (with -DERR1 / -DERR2, of course).

Below the signature you find a uuencoded .tgz archive of all relevant
files.

Can anyone help me with a workaround?

Regards,

 Stefan

___________________________________________________________________________

Dipl.-Inform. Stefan Kirchberg      Email:    sk@gluit.de
gluIT Software GmbH                 Tel:      0231/975136-13 oder -0
Martin-Schmeißer-Weg 4              Fax:      0231/975136-19
D-44227 Dortmund                    UTM:      32U 0384959 5723352
Germany                             LatLong:  51º38'57.8"N 007º20'13.8"E
___________________________________________________________________________

  Die Zukunft ist auch nicht mehr das, was sie einmal war   -- A.C.Clarke
___________________________________________________________________________
uuencode errors.tgz errors.tgz
begin 640 errors.tgz
M'XL(`&5SNC<"`^U9;8_;N!'V5^E7\+QI8>_9LJA7V]L4E]LZ:8#MP4A;'(KB
M(,BR[%5C2X8D;YP&Z6_O\$42)<NV]G+9[?7$`+$TG.$,GV?(I3BS=^_PJ/-U
M&S)4VU11!R&$3<Q_;?K+FXJ099N689F:;<"[;6*U@\S.$[1]DKHQ0IWD_7F]
M]68?I)W_NS8C_!^4(/B*/K"J6L9I_G5H&?^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