Skip to content

Commit

Permalink
goto-gcc: run original compiler even when output is /dev/null
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jul 9, 2018
1 parent 0d7a943 commit ea9dc15
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions regression/goto-gcc/dev_null1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
void fails(void)
{
asm volatile ( ".if (0 == 0); .error \"asm error\";.endif" );
}
8 changes: 8 additions & 0 deletions regression/goto-gcc/dev_null1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
main.c
-o /dev/null
^EXIT=1$
^SIGNAL=0$
--
^warning: ignoring
^CONVERSION ERROR$
2 changes: 1 addition & 1 deletion src/goto-cc/gcc_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ int gcc_modet::gcc_hybrid_binary(compilet &compiler)
if(output_files.empty() ||
(output_files.size()==1 &&
output_files.front()=="/dev/null"))
return EX_OK;
return run_gcc(compiler);

debug() << "Running " << native_tool_name
<< " to generate hybrid binary" << eom;
Expand Down

0 comments on commit ea9dc15

Please sign in to comment.