Skip to content

Commit bb7ea78

Browse files
author
Daniel Kroening
authored
Merge pull request #2528 from tautschnig/dev-null
goto-gcc: run original compiler even when output is /dev/null
2 parents 7f8b2be + ea9dc15 commit bb7ea78

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

regression/goto-gcc/dev_null1/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
void fails(void)
2+
{
3+
asm volatile ( ".if (0 == 0); .error \"asm error\";.endif" );
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
-o /dev/null
4+
^EXIT=1$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
^CONVERSION ERROR$

src/goto-cc/gcc_mode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ int gcc_modet::gcc_hybrid_binary(compilet &compiler)
914914
if(output_files.empty() ||
915915
(output_files.size()==1 &&
916916
output_files.front()=="/dev/null"))
917-
return EX_OK;
917+
return run_gcc(compiler);
918918

919919
debug() << "Running " << native_tool_name
920920
<< " to generate hybrid binary" << eom;

0 commit comments

Comments
 (0)