compiler segfault: long identifier

Deewiant deewiant.doesnotlike.spam at gmail.com
Sat Feb 25 07:40:18 PST 2006


Wang Zhen wrote:
> Not reproducible on Windows XP.

Agreed - it gives the error "identifer <mangled form of the identifier> is too
long by 2920 characters".

What's interesting, though, is that the following code gives the error
"identifier <...> is too long by 348 characters" but removing only one character
from the identifier makes it compile and run just fine.

int
AGuidetotheSLangLanguageJohnEDavisdavisspacemiteduMar232003TableofContentsPreface1ABriefHistoryofSLang2Acknowledgements2Introduction3LanguageFeatures4DataTypesandOperators5StatementsandFunctions6ErrorHandling7RunTimeLibrary8InputOutput9ObtainingSLang9OverviewoftheLanguage10VariablesandFunctions11Strings12ReferencingandDereferencing13Arrays14StructuresandUserDefinedTypes15Namespaces15DataTypesandLiteralConstants16PredefinedDataTypes161Integers162FloatingPointNumbers163ComplexNumbers164Strings165NullType166RefType167ArrayTypeandStructType168DataTypeTypeType17TypecastingConvertingfromoneTypetoAnother17Identifiers17Variables17Operators18UnaryOperators19BinaryOperators191ArithmeticOperators192RelationalOperators193BooleanOperators194BitwiseOperators195Namespaceoperator196OperatorPrecedence197BinaryOperatorsandFunctionsReturningMultipleValues20MixingIntegerandFloatingPointArithmetic21ShortCircuitBooleanEvaluation21Statements22VariableDeclarationStatements23AssignmentStatements24Co
nditionalandLoopingStatements241ConditionalForms2411if2412ifelse2413if2414orelseandelse2415switch242LoopingForms2421while2422dowhile2423for2424loop2425for2426forever2427foreach25breakreturncontinue25Functions26DeclaringFunaabdsadfasdfann
= 3;

void main() {
	AGuidetotheSLangLanguageJohnEDavisdavisspacemiteduMar232003TableofContentsPreface1ABriefHistoryofSLang2Acknowledgements2Introduction3LanguageFeatures4DataTypesandOperators5StatementsandFunctions6ErrorHandling7RunTimeLibrary8InputOutput9ObtainingSLang9OverviewoftheLanguage10VariablesandFunctions11Strings12ReferencingandDereferencing13Arrays14StructuresandUserDefinedTypes15Namespaces15DataTypesandLiteralConstants16PredefinedDataTypes161Integers162FloatingPointNumbers163ComplexNumbers164Strings165NullType166RefType167ArrayTypeandStructType168DataTypeTypeType17TypecastingConvertingfromoneTypetoAnother17Identifiers17Variables17Operators18UnaryOperators19BinaryOperators191ArithmeticOperators192RelationalOperators193BooleanOperators194BitwiseOperators195Namespaceoperator196OperatorPrecedence197BinaryOperatorsandFunctionsReturningMultipleValues20MixingIntegerandFloatingPointArithmetic21ShortCircuitBooleanEvaluation21Statements22VariableDeclarationStatements23AssignmentStatements24C
onditionalandLoopingStatements241ConditionalForms2411if2412ifelse2413if2414orelseandelse2415switch242LoopingForms2421while2422dowhile2423for2424loop2425for2426forever2427foreach25breakreturncontinue25Functions26DeclaringFunaabdsadfasdfann
+= 1;
	assert
(AGuidetotheSLangLanguageJohnEDavisdavisspacemiteduMar232003TableofContentsPreface1ABriefHistoryofSLang2Acknowledgements2Introduction3LanguageFeatures4DataTypesandOperators5StatementsandFunctions6ErrorHandling7RunTimeLibrary8InputOutput9ObtainingSLang9OverviewoftheLanguage10VariablesandFunctions11Strings12ReferencingandDereferencing13Arrays14StructuresandUserDefinedTypes15Namespaces15DataTypesandLiteralConstants16PredefinedDataTypes161Integers162FloatingPointNumbers163ComplexNumbers164Strings165NullType166RefType167ArrayTypeandStructType168DataTypeTypeType17TypecastingConvertingfromoneTypetoAnother17Identifiers17Variables17Operators18UnaryOperators19BinaryOperators191ArithmeticOperators192RelationalOperators193BooleanOperators194BitwiseOperators195Namespaceoperator196OperatorPrecedence197BinaryOperatorsandFunctionsReturningMultipleValues20MixingIntegerandFloatingPointArithmetic21ShortCircuitBooleanEvaluation21Statements22VariableDeclarationStatements23AssignmentStatements24C
onditionalandLoopingStatements241ConditionalForms2411if2412ifelse2413if2414orelseandelse2415switch242LoopingForms2421while2422dowhile2423for2424loop2425for2426forever2427foreach25breakreturncontinue25Functions26DeclaringFunaabdsadfasdfann
== 4);
}



More information about the Digitalmars-d-bugs mailing list