Bug 24222 - [meta-bug] The gimplifier shouldn't emit warnings or errors
Summary: [meta-bug] The gimplifier shouldn't emit warnings or errors
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: meta-bug
Depends on: 26748 26749 26747 26750 26751
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-06 01:29 UTC by Chris Lattner
Modified: 2006-03-18 16:43 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-03-18 16:26:58


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2005-10-06 01:29:06 UTC
Compiling a C++ file with -fsyntax-only -ftime-report includes time spent on 'tree gimplify'.  Unless I'm missing something, -fsyntax-only shouldn't have to gimplify anything.

-Chris
Comment 1 Andrew Pinski 2005-10-06 01:30:31 UTC
This needed for some syntaxical analysis, IIRC.
Comment 2 Andrew Pinski 2005-10-06 01:37:42 UTC
The following explains about the C compiler:
http://gcc.gnu.org/ml/gcc/2004-05/msg00257.html

It is semantical analysis and not syntax.
Comment 3 Andrew Pinski 2005-10-06 01:42:18 UTC
right now if we don't gimplify with -fsyntax-only, we would not be able to diagnostic the following:
void f(void)
{
  break;
}
Comment 4 Chris Lattner 2005-10-06 01:51:57 UTC
The gimplifier apparently emits these three errors:

error ("memory input %d is not directly addressable", i);
error ("invalid lvalue in asm output %d", i);
error ("too few arguments to function %<va_start%>");

In an ideal, modular, world, the front-ends should be emitting these.  If these checks need to be shared across different front-ends, the checks could be function calls in c-common, not be put into the gimplifier.

One immediate advantage would be that -fsyntax-only wouldn't need to run the gimplifier.

-Chris
Comment 5 Gabriel Dos Reis 2005-10-06 20:56:35 UTC
Subject: Re:  -fsyntax-only runs the gimplifier

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| right now if we don't gimplify with -fsyntax-only, we would not be able to
| diagnostic the following:
| void f(void)
| {
|   break;
| }

That is one more reason why it is a bug in the compiler.

-- Gaby
Comment 6 Gabriel Dos Reis 2005-10-06 20:57:13 UTC
Subject: Re:   New: -fsyntax-only runs the gimplifier

"sabre at nondot dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Compiling a C++ file with -fsyntax-only -ftime-report includes time spent on
| 'tree gimplify'.  Unless I'm missing something, -fsyntax-only
| shouldn't have to gimplify anything.

I strongly agree that that is a bug in the way the compiler currently works.

-- Gaby
Comment 7 Gabriel Dos Reis 2005-12-04 05:17:09 UTC
(In reply to comment #3)
> right now if we don't gimplify with -fsyntax-only, we would not be able to
> diagnostic the following:
> void f(void)
> {
>   break;
> }

If that is true, then it should be considered a bug in the C++ front-end. 

Comment 8 Andrew Pinski 2006-03-18 16:26:58 UTC
I am going to seperate this into a couple of different bugs.
Comment 9 Andrew Pinski 2006-03-18 16:39:27 UTC
I found some other ones which had been added after this bug report was open :(.