OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [doc/] [bugreport.texi] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 711 jeremybenn
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2
@c 1999, 2000, 2001, 2003, 2004, 2007 Free Software Foundation, Inc.
3
@c This is part of the GCC manual.
4
@c For copying conditions, see the file gcc.texi.
5
 
6
@node Bugs
7
@chapter Reporting Bugs
8
@cindex bugs
9
@cindex reporting bugs
10
 
11
Your bug reports play an essential role in making GCC reliable.
12
 
13
When you encounter a problem, the first thing to do is to see if it is
14
already known.  @xref{Trouble}.  If it isn't known, then you should
15
report the problem.
16
 
17
@menu
18
* Criteria:  Bug Criteria.   Have you really found a bug?
19
* Reporting: Bug Reporting.  How to report a bug effectively.
20
* Known: Trouble.            Known problems.
21
* Help: Service.             Where to ask for help.
22
@end menu
23
 
24
@node Bug Criteria,Bug Reporting,,Bugs
25
@section Have You Found a Bug?
26
@cindex bug criteria
27
 
28
If you are not sure whether you have found a bug, here are some guidelines:
29
 
30
@itemize @bullet
31
@cindex fatal signal
32
@cindex core dump
33
@item
34
If the compiler gets a fatal signal, for any input whatever, that is a
35
compiler bug.  Reliable compilers never crash.
36
 
37
@cindex invalid assembly code
38
@cindex assembly code, invalid
39
@item
40
If the compiler produces invalid assembly code, for any input whatever
41
(except an @code{asm} statement), that is a compiler bug, unless the
42
compiler reports errors (not just warnings) which would ordinarily
43
prevent the assembler from being run.
44
 
45
@cindex undefined behavior
46
@cindex undefined function value
47
@cindex increment operators
48
@item
49
If the compiler produces valid assembly code that does not correctly
50
execute the input source code, that is a compiler bug.
51
 
52
However, you must double-check to make sure, because you may have a
53
program whose behavior is undefined, which happened by chance to give
54
the desired results with another C or C++ compiler.
55
 
56
For example, in many nonoptimizing compilers, you can write @samp{x;}
57
at the end of a function instead of @samp{return x;}, with the same
58
results.  But the value of the function is undefined if @code{return}
59
is omitted; it is not a bug when GCC produces different results.
60
 
61
Problems often result from expressions with two increment operators,
62
as in @code{f (*p++, *p++)}.  Your previous compiler might have
63
interpreted that expression the way you intended; GCC might
64
interpret it another way.  Neither compiler is wrong.  The bug is
65
in your code.
66
 
67
After you have localized the error to a single source line, it should
68
be easy to check for these things.  If your program is correct and
69
well defined, you have found a compiler bug.
70
 
71
@item
72
If the compiler produces an error message for valid input, that is a
73
compiler bug.
74
 
75
@cindex invalid input
76
@item
77
If the compiler does not produce an error message for invalid input,
78
that is a compiler bug.  However, you should note that your idea of
79
``invalid input'' might be someone else's idea of ``an extension'' or
80
``support for traditional practice''.
81
 
82
@item
83
If you are an experienced user of one of the languages GCC supports, your
84
suggestions for improvement of GCC are welcome in any case.
85
@end itemize
86
 
87
@node Bug Reporting,,Bug Criteria,Bugs
88
@section How and where to Report Bugs
89
@cindex compiler bugs, reporting
90
 
91
Bugs should be reported to the bug database at @value{BUGURL}.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.