This is the mail archive of the gcc-patches@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]

Re: ggc_free


> On Sat, Jan 24, 2004 at 11:14:57PM +0100, Jan Hubicka wrote:
> > The problem is the trick:
> > 
> > #define SAVE_EXT_FLAGS()			\
> > 	size_int (pedantic			\
> > 		  | (warn_pointer_arith << 1)	\
> > 		  | (warn_traditional << 2)	\
> > 		  | (flag_iso << 3))
> 
> I don't believe in this at all.  We don't mark the rest of the
> bison stack either.  It's not supposed to matter.  We're not
> supposed to be gc'ing while trees are on the parse stack.  More,
> how are we gc'ing in the *middle* of parsing a function, which
> is the only time __extension__ should be able to be live?
> 
> My debugging of this pointed to the memory already having been
> reused at least once before we got here.  And that the memory
> had initially been allocated to the parameter list of a builtin
> function.  Which of course should never have gone away.
> 
> I'd not tracked it any farther.
Hi
the dump says:
...
Next token is 286 (EXTENSION [CPP_NAME])
Shifting token 286 (EXTENSION), Entering state 16
Reducing via rule 556 (line 2574), EXTENSION  -> extension

						 ^^^^^ If I understand
						 it right, here we get
						 extension on the stack.
state stack now 0 1 3
Entering state 56
Reading a token: Next token is 259 (SCSPEC [CPP_NAME] `extern')
Shifting token 259 (SCSPEC), Entering state 6
Reducing via rule 298 (line 1416), SCSPEC  -> scspec
state stack now 0 1 3 56
Entering state 50
Reducing via rule 157 (line 963), scspec  -> declspecs_sc_nots_nosa_noea
state stack now 0 1 3 56
Entering state 32
Reading a token: Next token is 259 (SCSPEC [CPP_NAME] `inline')
Shifting token 259 (SCSPEC), Entering state 6
Reducing via rule 298 (line 1416), SCSPEC  -> scspec
state stack now 0 1 3 56 32
Entering state 112
Reducing via rule 162 (line 985), declspecs_sc_nots_nosa_noea scspec  -> declspecs_sc_nots_nosa_noea
state stack now 0 1 3 56
Entering state 32
Reading a token: Next token is 261 (TYPESPEC [CPP_NAME] `long')
Shifting token 261 (TYPESPEC), Entering state 8
Reducing via rule 263 (line 1289), TYPESPEC  -> typespec_reserved_nonattr
state stack now 0 1 3 56 32
Entering state 45
Reducing via rule 260 (line 1280), typespec_reserved_nonattr  -> typespec_nonattr
state stack now 0 1 3 56 32
Entering state 109
Reducing via rule 176 (line 1057), declspecs_sc_nots_nosa_noea typespec_nonattr  -> declspecs_sc_ts_nosa_noea
state stack now 0 1 3 56
Entering state 36
Reading a token: Next token is 261 (TYPESPEC [CPP_NAME] `long')
Shifting token 261 (TYPESPEC), Entering state 8
Reducing via rule 263 (line 1289), TYPESPEC  -> typespec_reserved_nonattr
state stack now 0 1 3 56 36
Entering state 127
Reducing via rule 174 (line 1051), declspecs_sc_ts_nosa_noea typespec_reserved_nonattr  -> declspecs_sc_ts_nosa_noea
state stack now 0 1 3 56
Entering state 36
Reading a token: Next token is 261 (TYPESPEC [CPP_NAME] `int')
Shifting token 261 (TYPESPEC), Entering state 8
Reducing via rule 263 (line 1289), TYPESPEC  -> typespec_reserved_nonattr
state stack now 0 1 3 56 36
Entering state 127
Reducing via rule 174 (line 1051), declspecs_sc_ts_nosa_noea typespec_reserved_nonattr  -> declspecs_sc_ts_nosa_noea
state stack now 0 1 3 56
Entering state 36
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `strtoq')
Reducing via rule 206 (line 1176), declspecs_sc_ts_nosa_noea  -> declspecs_ts
state stack now 0 1 3 56
Entering state 40
Reducing via rule 117 (line 761),  -> setspecs
state stack now 0 1 3 56 40
Entering state 144
Next token is 257 (IDENTIFIER [CPP_NAME] `strtoq')
Shifting token 257 (IDENTIFIER), Entering state 66
Reducing via rule 348 (line 1626), IDENTIFIER  -> notype_declarator
state stack now 0 1 3 56 40 144
Entering state 225
Reading a token: Next token is 40 ('(' [(])
Shifting token 40 ('('), Entering state 213
Reading a token: Next token is 262 (TYPE_QUAL [CPP_NAME] `const')
Reducing via rule 281 (line 1365),  -> maybe_attribute
state stack now 0 1 3 56 40 144 225 213
Entering state 296
Reducing via rule 548 (line 2531),  -> @42
state stack now 0 1 3 56 40 144 225 213 296
Entering state 398
Next token is 262 (TYPE_QUAL [CPP_NAME] `const')
Shifting token 262 (TYPE_QUAL), Entering state 9
Reducing via rule 125 (line 843), TYPE_QUAL  -> declspecs_nosc_nots_nosa_noea
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 409
Reading a token: Next token is 261 (TYPESPEC [CPP_NAME] `char')
Shifting token 261 (TYPESPEC), Entering state 8
Reducing via rule 263 (line 1289), TYPESPEC  -> typespec_reserved_nonattr
state stack now 0 1 3 56 40 144 225 213 296 398 409
Entering state 45
Reducing via rule 260 (line 1280), typespec_reserved_nonattr  -> typespec_nonattr
state stack now 0 1 3 56 40 144 225 213 296 398 409
Entering state 73
Reducing via rule 138 (line 895), declspecs_nosc_nots_nosa_noea typespec_nonattr  -> declspecs_nosc_ts_nosa_noea
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 411
Reading a token: Next token is 42 ('*' [*])
Reducing via rule 218 (line 1193), declspecs_nosc_ts_nosa_noea  -> declspecs_ts_nosa
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 481
Reducing via rule 117 (line 761),  -> setspecs
state stack now 0 1 3 56 40 144 225 213 296 398 481
Entering state 574
Reducing via rule 547 (line 2522), setspecs  -> setspecs_fp
state stack now 0 1 3 56 40 144 225 213 296 398 481
Entering state 575
Next token is 42 ('*' [*])
Shifting token 42 ('*'), Entering state 656
Reading a token: Next token is 262 (TYPE_QUAL [CPP_NAME] `__restrict__')
Shifting token 262 (TYPE_QUAL), Entering state 9
Reducing via rule 125 (line 843), TYPE_QUAL  -> declspecs_nosc_nots_nosa_noea
state stack now 0 1 3 56 40 144 225 213 296 398 481 575 656
Entering state 201
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `__nptr')
Reducing via rule 230 (line 1214), declspecs_nosc_nots_nosa_noea  -> declspecs_nosc_nots
state stack now 0 1 3 56 40 144 225 213 296 398 481 575 656
Entering state 205
Reducing via rule 259 (line 1255), declspecs_nosc_nots  -> maybe_type_quals_attrs
state stack now 0 1 3 56 40 144 225 213 296 398 481 575 656
Entering state 743
Next token is 257 (IDENTIFIER [CPP_NAME] `__nptr')
Shifting token 257 (IDENTIFIER), Entering state 66
Reducing via rule 348 (line 1626), IDENTIFIER  -> notype_declarator
state stack now 0 1 3 56 40 144 225 213 296 398 481 575 656 743
Entering state 291
Reading a token: Next token is 44 (',' [,])
Reducing via rule 346 (line 1622), '*' maybe_type_quals_attrs notype_declarator  -> notype_declarator
state stack now 0 1 3 56 40 144 225 213 296 398 481 575
Entering state 661
Next token is 44 (',' [,])
Reducing via rule 281 (line 1365),  -> maybe_attribute
state stack now 0 1 3 56 40 144 225 213 296 398 481 575 661
Entering state 750
Reducing via rule 543 (line 2503), declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute  -> firstparm
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 486
Reducing via rule 535 (line 2461), firstparm  -> parms
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 485
Next token is 44 (',' [,])
Shifting token 44 (','), Entering state 579
Reading a token: Next token is 261 (TYPESPEC [CPP_NAME] `char')
Shifting token 261 (TYPESPEC), Entering state 8
Reducing via rule 263 (line 1289), TYPESPEC  -> typespec_reserved_nonattr
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 45
Reducing via rule 260 (line 1280), typespec_reserved_nonattr  -> typespec_nonattr
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 43
Reducing via rule 133 (line 879), typespec_nonattr  -> declspecs_nosc_ts_nosa_noea
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 675
Reading a token: Next token is 42 ('*' [*])
Reducing via rule 202 (line 1171), declspecs_nosc_ts_nosa_noea  -> declspecs_ts
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 687
Reducing via rule 117 (line 761),  -> setspecs
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687
Entering state 756
Next token is 42 ('*' [*])
Shifting token 42 ('*'), Entering state 656
Reading a token: Next token is 42 ('*' [*])
Reducing via rule 258 (line 1252),  -> maybe_type_quals_attrs
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 656
Entering state 743
Next token is 42 ('*' [*])
Shifting token 42 ('*'), Entering state 656
Reading a token: Next token is 262 (TYPE_QUAL [CPP_NAME] `__restrict__')
Shifting token 262 (TYPE_QUAL), Entering state 9
Reducing via rule 125 (line 843), TYPE_QUAL  -> declspecs_nosc_nots_nosa_noea
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 656 743 656
Entering state 201
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `__endptr')
Reducing via rule 230 (line 1214), declspecs_nosc_nots_nosa_noea  -> declspecs_nosc_nots
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 656 743 656
Entering state 205
Reducing via rule 259 (line 1255), declspecs_nosc_nots  -> maybe_type_quals_attrs
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 656 743 656
Entering state 743
Next token is 257 (IDENTIFIER [CPP_NAME] `__endptr')
Shifting token 257 (IDENTIFIER), Entering state 66
Reducing via rule 348 (line 1626), IDENTIFIER  -> notype_declarator
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 656 743 656 743
Entering state 291
Reading a token: Next token is 44 (',' [,])
Reducing via rule 346 (line 1622), '*' maybe_type_quals_attrs notype_declarator  -> notype_declarator
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 656 743
Entering state 291
Next token is 44 (',' [,])
Reducing via rule 346 (line 1622), '*' maybe_type_quals_attrs notype_declarator  -> notype_declarator
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756
Entering state 796
Next token is 44 (',' [,])
Reducing via rule 281 (line 1365),  -> maybe_attribute
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 796
Entering state 824
Reducing via rule 538 (line 2476), declspecs_ts setspecs notype_declarator maybe_attribute  -> parm
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 689
Reducing via rule 536 (line 2464), parms ',' parm  -> parms
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 485
Next token is 44 (',' [,])
Shifting token 44 (','), Entering state 579
Reading a token: Next token is 261 (TYPESPEC [CPP_NAME] `int')
Shifting token 261 (TYPESPEC), Entering state 8
Reducing via rule 263 (line 1289), TYPESPEC  -> typespec_reserved_nonattr
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 45
Reducing via rule 260 (line 1280), typespec_reserved_nonattr  -> typespec_nonattr
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 43
Reducing via rule 133 (line 879), typespec_nonattr  -> declspecs_nosc_ts_nosa_noea
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 675
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `__base')
Reducing via rule 202 (line 1171), declspecs_nosc_ts_nosa_noea  -> declspecs_ts
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 687
Reducing via rule 117 (line 761),  -> setspecs
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687
Entering state 756
Next token is 257 (IDENTIFIER [CPP_NAME] `__base')
Shifting token 257 (IDENTIFIER), Entering state 66
Reducing via rule 348 (line 1626), IDENTIFIER  -> notype_declarator
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756
Entering state 796
Reading a token: Next token is 41 (')' [)])
Reducing via rule 281 (line 1365),  -> maybe_attribute
state stack now 0 1 3 56 40 144 225 213 296 398 485 579 687 756 796
Entering state 824
Reducing via rule 538 (line 2476), declspecs_ts setspecs notype_declarator maybe_attribute  -> parm
state stack now 0 1 3 56 40 144 225 213 296 398 485 579
Entering state 689
Reducing via rule 536 (line 2464), parms ',' parm  -> parms
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 485
Next token is 41 (')' [)])
Reducing via rule 533 (line 2451), parms  -> parmlist_2
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 484
Next token is 41 (')' [)])
Shifting token 41 (')'), Entering state 577
Reducing via rule 526 (line 2423), parmlist_2 ')'  -> parmlist_1
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 483
Reducing via rule 550 (line 2540), parmlist_1  -> parmlist_or_identifiers_1
state stack now 0 1 3 56 40 144 225 213 296 398
Entering state 487
Reducing via rule 549 (line 2531), maybe_attribute @42 parmlist_or_identifiers_1  -> parmlist_or_identifiers
state stack now 0 1 3 56 40 144 225 213
Entering state 297
Reducing via rule 344 (line 1614), notype_declarator '(' parmlist_or_identifiers  -> notype_declarator
state stack now 0 1 3 56 40 144
Entering state 225
Reading a token: Next token is 123 ('{' [{])
Reducing via rule 328 (line 1555), notype_declarator  -> declarator
state stack now 0 1 3 56 40 144
Entering state 223
Next token is 123 ('{' [{])
Reducing via rule 19 (line 383),  -> @3
 strtoq
state stack now 0 1 3 56 40 144 223
Entering state 314
Next token is 123 ('{' [{])
Reducing via rule 105 (line 699),  -> old_style_parm_decls_1
state stack now 0 1 3 56 40 144 223 314
Entering state 303
Reducing via rule 104 (line 692), old_style_parm_decls_1  -> old_style_parm_decls
state stack now 0 1 3 56 40 144 223 314
Entering state 423
Reducing via rule 470 (line 2143),  -> save_location
state stack now 0 1 3 56 40 144 223 314 423
Entering state 502
Reducing via rule 20 (line 383),  -> @4
state stack now 0 1 3 56 40 144 223 314 423 502
Entering state 593
Next token is 123 ('{' [{])
Shifting token 123 ('{'), Entering state 551
Reducing via rule 457 (line 2048), '{'  -> compstmt_start
state stack now 0 1 3 56 40 144 223 314 423 502 593
Entering state 559
Reading a token: Next token is 280 (RETURN [CPP_NAME])
Reducing via rule 446 (line 1971),  -> pushlevel
state stack now 0 1 3 56 40 144 223 314 423 502 593 559
Entering state 278
Next token is 280 (RETURN [CPP_NAME])
Reducing via rule 450 (line 2016),  -> maybe_label_decls
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278
Entering state 379
Next token is 280 (RETURN [CPP_NAME])
Reducing via rule 470 (line 2143),  -> save_location
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379
Entering state 464
Next token is 280 (RETURN [CPP_NAME])
Shifting token 280 (RETURN), Entering state 547
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `__strtoll_internal')
Shifting token 257 (IDENTIFIER), Entering state 157
Reducing via rule 85 (line 598), IDENTIFIER  -> primary
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547
Entering state 186
Next token is 40 ('(' [(])
Shifting token 40 ('('), Entering state 274
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `__nptr')
Shifting token 257 (IDENTIFIER), Entering state 157
Reducing via rule 85 (line 598), IDENTIFIER  -> primary
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 186
Next token is 44 (',' [,])
Reducing via rule 45 (line 466), primary  -> unary_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 181
Reducing via rule 59 (line 513), unary_expr  -> cast_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 184
Reducing via rule 61 (line 519), cast_expr  -> expr_no_commas
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 185
Next token is 44 (',' [,])
Reducing via rule 43 (line 459), expr_no_commas  -> nonnull_exprlist
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 375
Next token is 44 (',' [,])
Shifting token 44 (','), Entering state 248
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `__endptr')
Shifting token 257 (IDENTIFIER), Entering state 157
Reducing via rule 85 (line 598), IDENTIFIER  -> primary
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 186
Next token is 44 (',' [,])
Reducing via rule 45 (line 466), primary  -> unary_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 181
Reducing via rule 59 (line 513), unary_expr  -> cast_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 184
Reducing via rule 61 (line 519), cast_expr  -> expr_no_commas
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 351
Next token is 44 (',' [,])
Reducing via rule 44 (line 462), nonnull_exprlist ',' expr_no_commas  -> nonnull_exprlist
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 375
Next token is 44 (',' [,])
Shifting token 44 (','), Entering state 248
Reading a token: Next token is 257 (IDENTIFIER [CPP_NAME] `__base')
Shifting token 257 (IDENTIFIER), Entering state 157
Reducing via rule 85 (line 598), IDENTIFIER  -> primary
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 186
Next token is 44 (',' [,])
Reducing via rule 45 (line 466), primary  -> unary_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 181
Reducing via rule 59 (line 513), unary_expr  -> cast_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 184
Reducing via rule 61 (line 519), cast_expr  -> expr_no_commas
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 351
Next token is 44 (',' [,])
Reducing via rule 44 (line 462), nonnull_exprlist ',' expr_no_commas  -> nonnull_exprlist
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 375
Next token is 44 (',' [,])
Shifting token 44 (','), Entering state 248
Reading a token: Next token is 263 (CONSTANT [CPP_NUMBER] SI 0x000000000)
Shifting token 263 (CONSTANT), Entering state 158
Reducing via rule 86 (line 605), CONSTANT  -> primary
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 186
Reading a token: Next token is 41 (')' [)])
Reducing via rule 45 (line 466), primary  -> unary_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 181
Reducing via rule 59 (line 513), unary_expr  -> cast_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 184
Reducing via rule 61 (line 519), cast_expr  -> expr_no_commas
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274 375 248
Entering state 351
Next token is 41 (')' [)])
Reducing via rule 44 (line 462), nonnull_exprlist ',' expr_no_commas  -> nonnull_exprlist
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 375
Next token is 41 (')' [)])
Reducing via rule 42 (line 456), nonnull_exprlist  -> exprlist
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547 186 274
Entering state 374
Next token is 41 (')' [)])
Shifting token 41 (')'), Entering state 450
Reducing via rule 95 (line 649), primary '(' exprlist ')'  -> primary
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547
Entering state 186
Reading a token: Next token is 59 (';' [;])
Reducing via rule 45 (line 466), primary  -> unary_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547
Entering state 181
Reducing via rule 59 (line 513), unary_expr  -> cast_expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547
Entering state 184
Reducing via rule 61 (line 519), cast_expr  -> expr_no_commas
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547
Entering state 185
Next token is 59 (';' [;])
Reducing via rule 43 (line 459), expr_no_commas  -> nonnull_exprlist
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547
Entering state 180
Next token is 59 (';' [;])
Reducing via rule 40 (line 449), nonnull_exprlist  -> expr
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464 547
Entering state 631
Next token is 59 (';' [;])
Shifting token 59 (';'), Entering state 719
Reducing via rule 500 (line 2297), RETURN expr ';'  -> stmt
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 464
Entering state 561
Reducing via rule 474 (line 2161), save_location stmt  -> lineno_stmt
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379
Entering state 465
Reducing via rule 425 (line 1928), lineno_stmt  -> lineno_stmt_decl_or_labels_ending_stmt
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379
Entering state 457
Reading a token: Next token is 125 ('}' [}])
Reducing via rule 421 (line 1918), lineno_stmt_decl_or_labels_ending_stmt  -> stmts_and_decls
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379
Entering state 456
Reducing via rule 460 (line 2061), stmts_and_decls  -> compstmt_contents_nonempty
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379
Entering state 463
Next token is 125 ('}' [}])
Shifting token 125 ('}'), Entering state 540
Reducing via rule 447 (line 1978),  -> poplevel
state stack now 0 1 3 56 40 144 223 314 423 502 593 559 278 379 463 540
Entering state 625
Reducing via rule 459 (line 2054), pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel  -> compstmt_nostart
state stack now 0 1 3 56 40 144 223 314 423 502 593 559
Entering state 650
Reducing via rule 463 (line 2083), compstmt_start compstmt_nostart  -> compstmt
state stack now 0 1 3 56 40 144 223 314 423 502 593
Entering state 586
Reducing via rule 455 (line 2042), compstmt  -> compstmt_or_error
state stack now 0 1 3 56 40 144 223 314 423 502 593
Entering state 695
Reducing via rule 21 (line 383), declspecs_ts setspecs declarator @3 old_style_parm_decls save_location @4 compstmt_or_error  -> fndef

 {GC 680k -> 679k}state stack now 0 1 3 56

^^^ here we finish parsing of function.
Entering state 21
Reducing via rule 8 (line 347), fndef  -> extdef_1
state stack now 0 1 3 56
Entering state 19
Reducing via rule 7 (line 342), extdef_1  -> extdef
state stack now 0 1 3 56
Entering state 156
Reducing via rule 11 (line 358), extension extdef  -> extdef_1

In file included from ../../../libiberty/regex.c:130:
/usr/include/stdlib.h:330: internal compiler error: in tree_low_cst, at tree.c:3320
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


And here we are trying to get out of the extension context.
It comes from parsing the extern inline function and it seems to me that
I've introduced the problem last month by adding ggc_collect call to
cgraph_finalize_funciton some time ago in order to cut down memory
consumption of templates.  It seems to be sane to protect the values as
I did in my patch.  (or alternativly I can fall back into having the
ggc_collect call inside C++ frontend)

The testcase is:

__extension__ extern __inline long long int
strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
		  int __base)
{
	  return __strtoll_internal (__nptr, __endptr, __base, 0);
}

__extension__ extern __inline long long int
strtoll1 (__const char *__restrict __nptr, char **__restrict __endptr,
		  int __base)
{
	  return __strtoll_internal (__nptr, __endptr, __base, 0);
}

and needs to be compiled with  -pedantic -Wtraditional
(so we get right value on the stack that is not referenced otherwise.
This also explains why it does not reproduce on all my machines :)

Honza


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