Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
3b62f224
Commit
3b62f224
authored
Oct 01, 1999
by
Mark Mitchell
Committed by
Mark Mitchell
Oct 01, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* method.c (emit_thunk): Don't crash when -fsyntax-only.
From-SVN: r29748
parent
e82d3ca3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
19 deletions
+52
-19
gcc/cp/ChangeLog
+2
-0
gcc/cp/method.c
+22
-19
gcc/testsuite/g++.old-deja/g++.other/syntax2.C
+28
-0
No files found.
gcc/cp/ChangeLog
View file @
3b62f224
1999-09-30 Mark Mitchell <mark@codesourcery.com>
1999-09-30 Mark Mitchell <mark@codesourcery.com>
* method.c (emit_thunk): Don't crash when -fsyntax-only.
* cp-tree.h (lang_decl_flags): Add global_ctor_p and
* cp-tree.h (lang_decl_flags): Add global_ctor_p and
global_dtor_p. Add init_priority.
global_dtor_p. Add init_priority.
(DECL_ACCESS): Adjust accordingly.
(DECL_ACCESS): Adjust accordingly.
...
...
gcc/cp/method.c
View file @
3b62f224
...
@@ -2086,26 +2086,29 @@ emit_thunk (thunk_fndecl)
...
@@ -2086,26 +2086,29 @@ emit_thunk (thunk_fndecl)
TREE_SET_CODE
(
thunk_fndecl
,
FUNCTION_DECL
);
TREE_SET_CODE
(
thunk_fndecl
,
FUNCTION_DECL
);
{
#ifdef ASM_OUTPUT_MI_THUNK
#ifdef ASM_OUTPUT_MI_THUNK
char
*
fnname
;
if
(
!
flag_syntax_only
)
current_function_decl
=
thunk_fndecl
;
{
/* Make sure we build up its RTL before we go onto the
char
*
fnname
;
temporary obstack. */
current_function_decl
=
thunk_fndecl
;
make_function_rtl
(
thunk_fndecl
);
/* Make sure we build up its RTL before we go onto the
temporary_allocation
();
temporary obstack. */
DECL_RESULT
(
thunk_fndecl
)
make_function_rtl
(
thunk_fndecl
);
=
build_decl
(
RESULT_DECL
,
0
,
integer_type_node
);
temporary_allocation
();
fnname
=
XSTR
(
XEXP
(
DECL_RTL
(
thunk_fndecl
),
0
),
0
);
DECL_RESULT
(
thunk_fndecl
)
init_function_start
(
thunk_fndecl
,
input_filename
,
lineno
);
=
build_decl
(
RESULT_DECL
,
0
,
integer_type_node
);
current_function_is_thunk
=
1
;
fnname
=
XSTR
(
XEXP
(
DECL_RTL
(
thunk_fndecl
),
0
),
0
);
assemble_start_function
(
thunk_fndecl
,
fnname
);
init_function_start
(
thunk_fndecl
,
input_filename
,
lineno
);
ASM_OUTPUT_MI_THUNK
(
asm_out_file
,
thunk_fndecl
,
delta
,
function
);
current_function_is_thunk
=
1
;
assemble_end_function
(
thunk_fndecl
,
fnname
);
assemble_start_function
(
thunk_fndecl
,
fnname
);
permanent_allocation
(
1
);
ASM_OUTPUT_MI_THUNK
(
asm_out_file
,
thunk_fndecl
,
delta
,
function
);
current_function_decl
=
0
;
assemble_end_function
(
thunk_fndecl
,
fnname
);
current_function
=
0
;
permanent_allocation
(
1
);
current_function_decl
=
0
;
current_function
=
0
;
}
#else
/* ASM_OUTPUT_MI_THUNK */
#else
/* ASM_OUTPUT_MI_THUNK */
{
/* If we don't have the necessary macro for efficient thunks, generate a
/* If we don't have the necessary macro for efficient thunks, generate a
thunk function that just makes a call to the real function.
thunk function that just makes a call to the real function.
Unfortunately, this doesn't work for varargs. */
Unfortunately, this doesn't work for varargs. */
...
@@ -2157,8 +2160,8 @@ emit_thunk (thunk_fndecl)
...
@@ -2157,8 +2160,8 @@ emit_thunk (thunk_fndecl)
output_inline_function
(
thunk_fndecl
);
output_inline_function
(
thunk_fndecl
);
permanent_allocation
(
1
);
permanent_allocation
(
1
);
}
}
#endif
/* ASM_OUTPUT_MI_THUNK */
}
}
#endif
/* ASM_OUTPUT_MI_THUNK */
TREE_SET_CODE
(
thunk_fndecl
,
THUNK_DECL
);
TREE_SET_CODE
(
thunk_fndecl
,
THUNK_DECL
);
}
}
...
...
gcc/testsuite/g++.old-deja/g++.other/syntax2.C
0 → 100644
View file @
3b62f224
// Build don't link:
// Special g++ Options: -fsyntax-only
// Origin: Mark Mitchell <mark@codesourcery.com>
struct
B
{
double
d
;
virtual
void
f
();
};
struct
C
:
virtual
public
B
{
char
c
;
};
struct
D
:
virtual
public
B
{
int
i
;
virtual
void
f
();
};
struct
E
:
public
C
,
public
D
{
};
E
e
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment