-
Notifications
You must be signed in to change notification settings - Fork 0
/
NEWS
20724 lines (18122 loc) · 945 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This file contains information about GCC releases which has been generated
automatically from the online release notes. It covers releases of GCC
(and the former EGCS project) since EGCS 1.0, on the line of development
that led to GCC 3. For information on GCC 2.8.1 and older releases of GCC 2,
see ONEWS.
======================================================================
http://gcc.gnu.org/gcc-10/index.html
GCC 10 Release Series
May 7, 2020
The [1]GNU project and the GCC developers are pleased to announce the
release of GCC 10.1.
This release is a major release, containing new features (as well as
many other improvements) relative to GCC 9.x.
Release History
GCC 10.1
May 7, 2020 ([2]changes, [3]documentation)
References and Acknowledgements
GCC used to stand for the GNU C Compiler, but since the compiler
supports several other languages aside from C, it now stands for the
GNU Compiler Collection.
A list of [4]successful builds is updated as new information becomes
available.
The GCC developers would like to thank the numerous people that have
contributed new features, improvements, bug fixes, and other changes as
well as test results to GCC. This [5]amazing group of volunteers is
what makes GCC successful.
For additional information about GCC please refer to the [6]GCC project
web site or contact the [7]GCC development mailing list.
To obtain GCC please use [8]our mirror sites or [9]our version control
system.
For questions related to the use of GCC, please consult these web
pages and the [10]GCC manuals. If that fails, the
[11]gcc-help@gcc.gnu.org mailing list might help. Comments on these
web pages and the development of GCC are welcome on our developer
list at [12]gcc@gcc.gnu.org. All of [13]our lists have public
archives.
Copyright (C) [14]Free Software Foundation, Inc. Verbatim copying and
distribution of this entire article is permitted in any medium,
provided this notice is preserved.
These pages are [15]maintained by the GCC team. Last modified
2020-05-07[16].
References
1. http://www.gnu.org/
2. http://gcc.gnu.org/gcc-10/changes.html
3. http://gcc.gnu.org/onlinedocs/10.1.0/
4. http://gcc.gnu.org/gcc-10/buildstat.html
5. http://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Contributors.html
6. http://gcc.gnu.org/index.html
7. mailto:gcc@gcc.gnu.org
8. http://gcc.gnu.org/mirrors.html
9. http://gcc.gnu.org/git.html
10. https://gcc.gnu.org/onlinedocs/
11. mailto:gcc-help@gcc.gnu.org
12. mailto:gcc@gcc.gnu.org
13. https://gcc.gnu.org/lists.html
14. https://www.fsf.org/
15. https://gcc.gnu.org/about.html
16. http://validator.w3.org/check/referer
======================================================================
http://gcc.gnu.org/gcc-10/changes.html
GCC 10 Release Series
Changes, New Features, and Fixes
This page is a "brief" summary of some of the huge number of
improvements in GCC 10. You may also want to check out our [1]Porting
to GCC 10 page and the [2]full GCC documentation.
Caveats
* An ABI incompatibility between C++14 and C++17 has been fixed. On
some targets a class with a zero-sized subobject would be passed
incorrectly when compiled as C++17 or C++20. See the [3]C++ notes
below for more details.
* The deprecated Profile Mode and array_allocator extensions have
been removed from libstdc++.
* The non-standard std::__is_nullptr_t type trait is deprecated and
will be removed from libstdc++ in a future release. The standard
trait std::is_null_pointer should be instead.
* The minimum version of the [4]MPFR library required for building
GCC has been increased to version 3.1.0 (released 2011-10-03).
* The automatic template instantiation at link time (-frepo) has been
removed.
* The --param allow-store-data-races internal parameter has been
removed in favor of a new official option -fallow-store-data-races.
While default behavior is unchanged and the new option allows to
correctly maintain a per compilation unit setting across link-time
optimization, alteration of the default via --param
allow-store-data-races will now be diagnosed and build systems have
to be adjusted accordingly.
* Offloading to Heterogeneous System Architecture Intermediate
Language (HSAIL) has been deprecated and will likely be removed in
a future release.
General Improvements
* New built-in functions:
+ The [5]__has_builtin built-in preprocessor operator can be
used to query support for built-in functions provided by GCC
and other compilers that support it.
+ __builtin_roundeven for the corresponding function from
ISO/IEC TS 18661.
* New command-line options:
+ [6]-fallocation-dce removes unneeded pairs of new and delete
operators.
+ [7]-fprofile-partial-training can now be used to inform the
compiler that code paths not covered by the training run
should not be optimized for size.
+ [8]-fprofile-reproducible controls level of reproducibility of
profile gathered by [9]-fprofile-generate. This makes it
possible to rebuild program with same outcome which is useful,
for example, for distribution packages.
+ [10]-fprofile-prefix-path can be used in combination with
-fprofile-generate=profile_dir and -fprofile-use=profile_dir
to inform GCC where the base directory of build source tree is
in case it differs between instrumentation and optimized
builds.
+ [11]-fanalyzer enables a new static analysis pass and
associated warnings. This pass performs a time-consuming
exploration of paths through the code in the hope of detecting
various common errors, such as double-free bugs. This option
should be regarded as experimental in this release. In
particular, analysis of non-C code is unlikely to work.
* Inter-procedural optimization improvements:
+ The inter-procedural scalar replacement of aggregates
(IPA-SRA) pass was re-implemented to work at link-time and can
now also remove computing and returning unused return values.
+ [12]-finline-functions is now enabled at -O2 and was retuned
for better code size versus runtime performance trade-offs.
Inliner heuristics was also significantly sped up to avoid
negative impact to -flto -O2 compile times.
+ Inliner heuristics and function cloning can now use
value-range information to predict effectivity of individual
transformations.
+ During link-time optimization the C++ One Definition Rule is
used to increase precision of type based alias analysis.
* Link-time optimization improvements:
+ A new binary [13]lto-dump has been added. The program can dump
various information about a LTO bytecode object file.
+ Parallel phase of the LTO can automatically detect a running
make's jobserver or can fall back to number of available
cores.
+ The LTO bytecode can be compressed with [14]zstd algorithm.
Configure script can automatically detect the zstd support.
+ Most --param values can now be specified at translation unit
granularity. This includes all parameters controlling the
inliner and other inter-procedural optimizations. Unlike
earlier releases, GCC 10 will ignore parameters controlling
optimizations specified at link-time and apply parameters
specified at compile-time in the same manner as done for
optimization flags.
* Profile driven optimization improvements:
+ Profile maintenance during compilation and hot/cold code
partitioning have been improved.
+ Using [15]-fprofile-values, an instrumented binary can track
multiple values (up to 4) for e.g. indirect calls and provide
more precise profile information.
New Languages and Language-Specific Improvements
* Version 2.6 of the [16]OpenACC specification is now supported in
the C, C++ and Fortran compilers. See the [17]implementation status
section on the OpenACC wiki page and the [18]run-time library
documentation for further information.
* GCC 10 adds a number of newly implemented [19]OpenMP 5.0 features
on top of the GCC 9 release such as conditional lastprivate clause,
scan and loop directives, order(concurrent) and use_device_addr
clauses support, if clause on simd construct or partial support for
the declare variant directive, getting closer to full support of
the OpenMP 5.0 standard.
* OpenMP and OpenACC now support [20]offloading to AMD Radeon (GCN)
GPUs; supported are the third-generation Fiji (fiji) and the
fifth-generation VEGA 10/VEGA 20 (gfx900 or gfx906).
C family
* New attributes:
+ The access function and type attribute has been added to
describe how a function accesses objects passed to it by
pointer or reference, and to associate such arguments with
integer arguments denoting the objects' sizes. The attribute
is used to enable the detection of invalid accesses by
user-defined functions, such as those diagnosed by
-Wstringop-overflow.
+ The symver attribute can be used to bind symbols to specific
version nodes on ELF platforms. This is preferred to using
inline assembly with GNU as symver directive because the
latter is not compatible with link-time optimizations.
* New warnings:
+ [21]-Wstring-compare, enabled by -Wextra, warns about equality
and inequality expressions between zero and the result of a
call to either strcmp and strncmp that evaluate to a constant
as a result of the length of one argument being greater than
the size of the array pointed to by the other.
+ [22]-Wzero-length-bounds, enabled by -Warray-bounds, warns
about accesses to elements of zero-length arrays that might
overlap other members of the same object.
* Enhancements to existing warnings:
+ [23]-Warray-bounds detects more out-of-bounds accesses to
member arrays as well as accesses to elements of zero-length
arrays.
+ [24]-Wformat-overflow makes full use of string length
information computed by the strlen optimization pass.
+ [25]-Wrestrict detects overlapping accesses to dynamically
allocated objects.
+ [26]-Wreturn-local-addr diagnoses more instances of return
statements returning addresses of automatic variables.
+ [27]-Wstringop-overflow detects more out-of-bounds stores to
member arrays including zero-length arrays, dynamically
allocated objects and variable length arrays, as well as more
instances of reads of unterminated character arrays by string
built-in functions. The warning also detects out-of-bounds
accesses by calls to user-defined functions declared with the
new attribute access.
* Extended characters in identifiers may now be specified directly in
the input encoding (UTF-8, by default), in addition to the UCN
syntax (\uNNNN or \UNNNNNNNN) that is already supported:
static const int π = 3;
int get_naïve_pi() {
return π;
}
C
* Several new features from the upcoming C2X revision of the ISO C
standard are supported with -std=c2x and -std=gnu2x. Some of these
features are also supported as extensions when compiling for older
language versions. In addition to the features listed, some
features previously supported as extensions and now added to the C
standard are enabled by default in C2X mode and not diagnosed with
-std=c2x -Wpedantic.
+ The [[]] attribute syntax is supported, as in C++. Existing
attributes can be used with this syntax in forms such as
[[gnu::const]]. The standard attributes [[deprecated]],
[[fallthrough]] and [[maybe_unused]] are supported.
+ UTF-8 character constants using the u8'' syntax are supported.
+ <float.h> defines macros FLT_NORM_MAX, DBL_NORM_MAX and
LDBL_NORM_MAX.
+ When decimal floating-point arithmetic is supported, <float.h>
defines macros DEC32_TRUE_MIN, DEC64_TRUE_MIN and
DEC128_TRUE_MIN, in addition to the macros that were
previously only defined if __STDC_WANT_DEC_FP__ was defined
before including <float.h>.
+ In C2X mode, empty parentheses in a function definition give
that function a type with a prototype for subsequent calls;
other old-style function definitions are diagnosed by default
in C2X mode.
+ The strftime format checking supports the %OB and %Ob formats.
+ In C2X mode, -fno-fp-int-builtin-inexact is enabled by
default.
* GCC now defaults to -fno-common. As a result, global variable
accesses are more efficient on various targets. In C, global
variables with multiple tentative definitions now result in linker
errors. With -fcommon such definitions are silently merged during
linking.
C++
* Several C++20 features have been implemented:
+ P1668R1, Permitting Unevaluated inline-assembly in constexpr
Functions
+ P1161R3, Deprecate a[b,c]
+ P0848R3, Conditionally Trivial Special Member Functions
+ P1091R3, Extending structured bindings
+ P1143R2, Adding the constinit keyword
+ P1152R4, Deprecating volatile
+ P0388R4, Permit conversions to arrays of unknown bound
+ P0784R7, constexpr new
+ Concepts, including P0734R0, P0857R0, P1084R2, P1141R2,
P0848R3, P1616R1, P1452R2
+ P1301R4, [[nodiscard("with reason")]]
+ P1814R0, class template argument deduction for alias templates
+ P1816R0, class template argument deduction for aggregates
+ P0960R3, Parenthesized initialization of aggregates
+ P1331R2, Allow trivial default initialization in constexpr
contexts
+ P1327R1, Allowing dynamic_cast and polymorphic typeid in
constexpr contexts
+ P0912R5, Coroutines (requires -fcoroutines)
* Several C++ Defect Reports have been resolved, e.g.:
+ DR 1560, lvalue-to-rvalue conversion in ?:
+ DR 1813, __is_standard_layout for a class with repeated bases
+ DR 2094, volatile scalars are trivially copyable,
+ DR 2096, constraints on literal unions
+ DR 2413, typename in conversion-function-ids
+ DR 2352, Similar types and reference binding
+ DR 1601, Promotion of enumeration with fixed underlying type
+ DR 330, Qualification conversions and pointers to arrays of
pointers
+ DR 1307, Overload resolution based on size of array
initializer-list
+ DR 1710, Missing template keyword in class-or-decltype
* New warnings:
+ [28]-Wmismatched-tags, disabled by default, warns about
declarations of structs, classes, and class templates and
their specializations with a class-key that does not match
either the definition or the first declaration if no
definition is provided. The option is provided to ease
portability to Windows-based compilers.
+ [29]-Wredundant-tags, disabled by default, warns about
redundant class-key and enum-key in contexts where the key can
be eliminated without causing an syntactic ambiguity.
* G++ can now detect modifying constant objects in constexpr
evaluation (which is undefined behavior).
* G++ no longer emits bogus -Wsign-conversion warnings with explicit
casts.
* Narrowing is now detected in more contexts (e.g., case values).
* Memory consumption of the compiler has been reduced in constexpr
evaluation.
* The noexcept-specifier is now properly treated as a complete-class
context as per [30][class.mem].
* The attribute deprecated can now be used on namespaces too.
* The ABI of passing and returning certain C++ classes by value
changed on several targets in GCC 10, including [31]AArch64,
[32]ARM, [33]PowerPC ELFv2, [34]S/390 and [35]Itanium. These
changes affect classes with a zero-sized subobject (an empty base
class, or data member with the [[no_unique_address]] attribute)
where all other non-static data members have the same type (this is
called a "homogeneous aggregate" in some ABI specifications, or if
there is only one such member, a "single element"). In -std=c++17
and -std=c++20 modes, classes with an empty base class were not
considered to have a single element or to be a homogeneous
aggregate, and so could be passed differently (in the wrong
registers or at the wrong stack address). This could make code
compiled with -std=c++17 and -std=c++14 ABI incompatible. This has
been corrected and the empty bases are ignored in those ABI
decisions, so functions compiled with -std=c++14 and -std=c++17 are
now ABI compatible again. Example: struct empty {}; struct S :
empty { float f; }; void f(S);. Similarly, in classes containing
non-static data members with empty class types using the C++20
[[no_unique_address]] attribute, those members weren't ignored in
the ABI argument passing decisions as they should be. Both of these
ABI changes are now diagnosed with -Wpsabi.
Runtime Library (libstdc++)
* Improved experimental C++2a support, including:
+ Library concepts in <concepts> and <iterator>.
+ Constrained algorithms in <ranges>, <algorithm>, and <memory>
(thanks to Patrick Palka).
+ New algorithms shift_left and shift_right (thanks to Patrick
Palka).
+ std::span (thanks to JeanHeyd Meneide).
+ Three-way comparisons in <compare> and throughout the library.
+ Constexpr support in <algorithm> and elsewhere (thanks to
Edward Smith-Rowland).
+ <stop_token> and std::jthread (thanks to Thomas Rodgers).
+ std::atomic_ref and std::atomic<floating point>.
+ Integer comparison functions (cmp_equal, cmp_less etc.).
+ std::ssize, std::to_array.
+ std::construct_at, std::destroy, constexpr std::allocator.
+ Mathematical constants in <numbers>.
* Support for RDSEED in std::random_device.
* Reduced header dependencies, leading to faster compilation for some
code.
Fortran
* use_device_addr of version 5.0 of the [36]OpenMP specification is
now supported. Note that otherwise OpenMP 4.5 is partially
supported in the Fortran compiler; the largest missing item is
structure element mapping.
* The default buffer size for I/O using unformatted files has been
increased to 1048576. The buffer size for can now be set at runtime
via the environment variables GFORTRAN_FORMATTED_BUFFER_SIZE and
GFORTRAN_UNFORMATTED_BUFFER_SIZE for formatted and unformatted
files, respectively.
* Mismatches between actual and dummy argument lists in a single file
are now rejected with an error. Use the new option
-fallow-argument-mismatch to turn these errors into warnings; this
option is implied with -std=legacy. -Wargument-mismatch has been
removed.
* The handling of a BOZ literal constant has been reworked to provide
better conformance to the Fortran 2008 and 2018 standards. In these
Fortran standards, a BOZ literal constant is a typeless and
kindless entity. As a part of the rework, documented and
undocumented extensions to the Fortran standard now emit errors
during compilation. Some of these extensions are permitted with the
-fallow-invalid-boz, where the error is degraded to a warning and
the code is compiled as with older gfortran.
* At any optimization level except-Os, gfortran now uses inline
packing for arguments instead of calling a library routine. If the
source contains a large number of arguments that need to be
repacked, code size or time for compilation can become excessive.
If that is the case, -fno-inline-arg-packing can be used to disable
inline argument packing.
* Legacy extensions:
+ For formatted input/output, if the explicit widths after the
data-edit descriptors I, F and G have been omitted, default
widths are used.
+ A blank format item at the end of a format specification, i.e.
nothing following the final comma, is allowed. Use the option
-fdec-blank-format-item; this option is implied with -fdec.
+ The existing support for AUTOMATIC and STATIC attributes has
been extended to allow variables with the AUTOMATIC attribute
to be used in EQUIVALENCE statements. Use -fdec-static; this
option is implied by -fdec.
+ Allow character literals in assignments and DATA statements
for numeric (INTEGER, REAL, or COMPLEX) or LOGICAL variables.
Use the option -fdec-char-conversions; this option is implied
with -fdec.
+ DEC comparisons, i.e. allow Hollerith constants to be used in
comparisons with INTEGER, REAL, COMPLEX and CHARACTER
expressions. Use the option -fdec.
* Character type names in errors and warnings now include len in
addition to kind; * is used for assumed length. The kind is omitted
if it is the default kind. Examples: CHARACTER(12), CHARACTER(6,4).
* CO_BROADCAST now supports derived type variables including objects
with allocatable components. In this case, the optional arguments
STAT= and ERRMSG= are currently ignored.
* The handling of module and submodule names has been reworked to
allow the full 63-character length mandated by the standard.
Previously symbol names were truncated if the combined length of
module, submodule, and function name exceeded 126 characters. This
change therefore breaks the ABI, but only for cases where this 126
character limit was exceeded.
New Targets and Target Specific Improvements
AArch64 & arm
* The AArch64 and arm ports now support condition flag output
constraints in inline assembly, as indicated by the
__GCC_ASM_FLAG_OUTPUTS__. On arm this feature is only available for
A32 and T32 targets. Please refer to the documentation for more
details.
AArch64
* There have been several improvements related to the Scalable Vector
Extension (SVE):
+ The SVE ACLE types and intrinsics are now supported. They can
be accessed using the header file arm_sve.h.
+ It is now possible to create fixed-length SVE types using the
arm_sve_vector_bits attribute. For example:
#if __ARM_FEATURE_SVE_BITS==512
typedef svint32_t vec512 __attribute__((arm_sve_vector_bits(512)));
typedef svbool_t pred512 __attribute__((arm_sve_vector_bits(512)));
#endif
+ -mlow-precision-div, -mlow-precision-sqrt and
-mlow-precision-recip-sqrt now work for SVE.
+ -msve-vector-bits=128 now generates vector-length-specific
code for little-endian targets. It continues to generate
vector-length-agnostic code for big-endian targets, just as
previous releases did for all targets.
+ The vectorizer is now able to use extending loads and
truncating stores, including gather loads and scatter stores.
+ The vectorizer now compares the cost of vectorizing with SVE
and vectorizing with Advanced SIMD and tries to pick the best
one. Previously it would always use SVE if possible.
+ If a vector loop uses Advanced SIMD rather than SVE, the
vectorizer now considers using SVE to vectorize the left-over
elements (the “scalar tail” or “epilog”).
+ Besides these specific points, there have been many general
improvements to the way that the vectorizer uses SVE.
* The -mbranch-protection=pac-ret option now accepts the optional
argument +b-key extension to perform return address signing with
the B-key instead of the A-key.
* The option -moutline-atomics has been added to aid deployment of
the Large System Extensions (LSE) on GNU/Linux systems built with a
baseline architecture targeting Armv8-A. When the option is
specified code is emitted to detect the presence of LSE
instructions at runtime and use them for standard atomic
operations. For more information please refer to the documentation.
* The Transactional Memory Extension is now supported through ACLE
intrinsics. It can be enabled through the +tme option extension
(for example, -march=armv8.5-a+tme).
* A number of features from Armv8.5-A are now supported through ACLE
intrinsics. These include:
+ The random number instructions that can be enabled through the
(already present in GCC 9.1) +rng option extension.
+ Floating-point intrinsics to round to integer instructions
from Armv8.5-A when targeting -march=armv8.5-a or later.
+ Memory Tagging Extension intrinsics enabled through the
+memtag option extension.
* Similarly, the following Armv8.6-A features are now supported
through ACLE intrinsics:
+ The bfloat16 extension. This extension is enabled
automatically when Armv8.6-A is selected (such as by
-march=armv8.6-a). It can also be enabled for Armv8.2-A and
later using the +bf16 option extension.
+ The Matrix Multiply extension. This extension is split into
three parts, one for each supported data type:
o Support for 8-bit integer matrix multiply instructions.
This extension is enabled automatically when Armv8.6-A is
selected. It can also be enabled for Armv8.2-A and later
using the +i8mm option extension.
o Support for 32-bit floating-point matrix multiply
instructions. This extension can be enabled using the
+f32mm option extension, which also has the effect of
enabling SVE.
o Support for 64-bit floating-point matrix multiply
instructions. This extension can be enabled using the
+f64mm option extension, which likewise has the effect of
enabling SVE.
* SVE2 is now supported through ACLE intrinsics and (to a limited
extent) through autovectorization. It can be enabled through the
+sve2 option extension (for example, -march=armv8.5-a+sve2).
Additional extensions can be enabled through +sve2-sm4, +sve2-aes,
+sve2-sha3 and +sve2-bitperm.
* Support has been added for the following processors (GCC
identifiers in parentheses):
+ Arm Cortex-A77 (cortex-a77).
+ Arm Cortex-A76AE (cortex-a76ae).
+ Arm Cortex-A65 (cortex-a65).
+ Arm Cortex-A65AE (cortex-a65ae).
+ Arm Cortex-A34 (cortex-a34).
+ Marvell ThunderX3 (thunderx3t110).
The GCC identifiers can be used as arguments to the -mcpu or -mtune
options, for example: -mcpu=cortex-a77 or -mtune=cortex-a65ae or as
arguments to the equivalent target attributes and pragmas.
arm
* Support for the FDPIC ABI has been added. It uses 64-bit function
descriptors to represent pointers to functions, and enables code
sharing on MMU-less systems. The corresponding target triple is
arm-uclinuxfdpiceabi, and the C library is uclibc-ng.
* Support has been added for the Arm EABI on NetBSD through the
arm*-*-netbsdelf-*eabi* triplet.
* The handling of 64-bit integer operations has been significantly
reworked and improved leading to improved performance and reduced
stack usage when using 64-bit integral data types. The option
-mneon-for-64bits is now deprecated and will be removed in a future
release.
* Support has been added for the following processors (GCC
identifiers in parentheses):
+ Arm Cortex-A77 (cortex-a77).
+ Arm Cortex-A76AE (cortex-a76ae).
+ Arm Cortex-M35P (cortex-m35p).
The GCC identifiers can be used as arguments to the -mcpu or -mtune
options, for example: -mcpu=cortex-a77 or -mtune=cortex-m35p.
* Support has been extended for the ACLE [37]data-processing
intrinsics to include 32-bit SIMD, saturating arithmetic, 16-bit
multiplication and other related intrinsics aimed at DSP algorithm
optimization.
* Support for -mpure-code in Thumb-1 (v6m) has been added: this
M-profile feature is no longer restricted to targets with MOVT. For
example, -mcpu=cortex-m0 now supports this option.
* Support for the Custom Datapath Extension beta ACLE [38]intrinsics
has been added.
AMD Radeon (GCN)
* The code generation and in particular the vectorization support has
been much improved.
ARC
* The interrupt service routine functions save all used registers,
including extension registers and auxiliary registers used by Zero
Overhead Loops.
* Improve code size by using multiple short instructions instead of a
single long mov or ior instruction when its long immediate constant
is known.
* Fix usage of the accumulator register for ARC600.
* Fix issues with uncached attribute.
* Remove -mq-class option.
* Improve 64-bit integer addition and subtraction operations.
AVR
* Support for the XMEGA-like devices
ATtiny202, ATtiny204, ATtiny402, ATtiny404, ATtiny406, ATtiny804,
ATtiny806, ATtiny807, ATtiny1604, ATtiny1606, ATtiny1607, ATmega808,
ATmega809, ATmega1608, ATmega1609, ATmega3208, ATmega3209,
ATmega4808, ATmega4809
has been added.
* A new command-line option -nodevicespecs has been added. It allows
to provide a custom device-specs file by means of
avr-gcc -nodevicespecs -specs=my-spec-file <options>
and without the need to provide options -B and -mmcu=. See [39]AVR
command-line options for details. This feature is also available in
GCC 9.3+ and GCC 8.4+.
* New command-line options -mdouble=[32,64] and -mlong-double=[32,64]
have been added. They allow to choose the size (in bits) of the
double and long double types, respectively. Whether or not the
mentioned layouts are available, whether the options act as a
multilib option, and the default for either option are controlled
by the new [40]AVR configure options --with-double= and
--with-long-double=.
* A new configure option --with-libf7= has been added. It controls to
which level avr-libgcc provides 64-bit floating point support by
means of [41]Libf7.
* A new configure option --with-double-comparison= has been added.
It's unlikely you need to set this option by hand.
IA-32/x86-64
* Support to expand __builtin_roundeven into the appropriate SSE 4.1
instruction has been added.
* New ISA extension support for Intel ENQCMD was added to GCC. ENQCMD
intrinsics are available via the -menqcmd compiler switch.
* GCC now supports the Intel CPU named Cooperlake through
-march=cooperlake. The switch enables the AVX512BF16 ISA
extensions.
* GCC now supports the Intel CPU named Tigerlake through
-march=tigerlake. The switch enables the MOVDIRI MOVDIR64B
AVX512VP2INTERSECT ISA extensions.
MIPS
* The mips*-*-linux* targets now mark object files with appropriate
GNU-stack note, facilitating use of non-executable stack hardening
on GNU/Linux. The soft-float targets have this feature enabled by
default, while for hard-float targets it is required for GCC to be
configured with --with-glibc-version=2.31 against glibc 2.31 or
later.
PowerPC / PowerPC64 / RS6000
* Many vector builtins have been listed as deprecated in the
[42]64-Bit ELF V2 ABI Specification for quite a number of years.
The vector builtins listed in Tables A.8 through A.10 are now
deprecated for GCC 10, and will likely be removed from support in
GCC 11.
PRU
* A new back end targeting TI PRU I/O processors has been contributed
to GCC.
RISC-V
* The riscv*-*-* targets now require GNU binutils version 2.30 or
later, to support new assembly instructions produced by GCC.
V850
* The ABI for V850 nested functions has been changed. Previously the
V850 port used %r20 for the static chain pointer, now the port uses
%r19. This corrects a long standing latent bug in the v850 port
where a call to a nested function would unexpectedly change the
value in %r20.
Operating Systems
Improvements for plugin authors
* GCC diagnostics can now have a chain of events associated with
them, describing a path through the code that triggers the problem.
These can be printed by the diagnostics subsystem in various ways,
controlled by the [43]-fdiagnostics-path-format option, or captured
in JSON form via [44]-fdiagnostics-format=json.
* GCC diagnostics can now be associated with [45]CWE weakness
identifiers, which will appear on the standard error stream, and in
the JSON output from [46]-fdiagnostics-format=json.
Other significant improvements
* To allow inline expansion of both memcpy and memmove, the existing
movmem instruction patterns used for non-overlapping memory copies
have been renamed to cpymem. The movmem name is now used for
overlapping memory moves, consistent with the library functions
memcpy and memmove.
* For many releases, when GCC emits a warning it prints the option
controlling that warning. As of GCC 10, that option text is now a
clickable hyperlink for the documentation of that option (assuming
a [47]sufficiently capable terminal). This behavior can be
controlled via a new [48]-fdiagnostics-urls option (along with
various environment variables and heuristics documented with that
option).
GCC 10.1
This is the [49]list of problem reports (PRs) from GCC's bug tracking
system that are known to be fixed in the 10.1 release. This list might
not be complete (that is, it is possible that some PRs that have been
fixed are not listed here).
For questions related to the use of GCC, please consult these web
pages and the [50]GCC manuals. If that fails, the
[51]gcc-help@gcc.gnu.org mailing list might help. Comments on these
web pages and the development of GCC are welcome on our developer
list at [52]gcc@gcc.gnu.org. All of [53]our lists have public
archives.
Copyright (C) [54]Free Software Foundation, Inc. Verbatim copying and
distribution of this entire article is permitted in any medium,
provided this notice is preserved.
These pages are [55]maintained by the GCC team. Last modified
2020-05-07[56].
References
1. http://gcc.gnu.org/gcc-10/porting_to.html
2. http://gcc.gnu.org/onlinedocs/index.html#current
3. http://gcc.gnu.org/gcc-10/changes.html#empty_base
4. https://www.mpfr.org/
5. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/cpp/_005f_005fhas_005fbuiltin.html#g_t_005f_005fhas_005fbuiltin
6. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fno-allocation-dce
7. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fprofile-partial-training
8. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fprofile-reproducible
9. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fprofile-generate
10. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fprofile-prefix-path
11. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.html
12. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-finline-functions
13. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/lto-dump.html
14. https://facebook.github.io/zstd/
15. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fprofile-values
16. https://www.openacc.org/
17. https://gcc.gnu.org/wiki/OpenACC#status-10
18. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/libgomp/#toc-Enabling-OpenACC-1
19. https://www.openmp.org/specifications/
20. https://gcc.gnu.org/wiki/Offloading
21. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wstring-compare
22. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wzero-length-bounds
23. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Warray-bounds
24. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wformat-overflow
25. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wrestrict
26. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wreturn-local-addr
27. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wstringop-overflow
28. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wmismatched-tags
29. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-tags
30. http://eel.is/c++draft/class.mem#def:complete-class_context
31. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94383
32. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94711
33. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94707
34. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94704
35. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94706
36. https://www.openmp.org/specifications/
37. https://developer.arm.com/docs/101028/0009/data-processing-intrinsics
38. https://developer.arm.com/docs/101028/0010/custom-datapath-extension
39. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/AVR-Options.html#index-nodevicespecs
40. https://gcc.gnu.org/install/configure.html#avr
41. https://gcc.gnu.org/wiki/avr-gcc#Libf7
42. https://openpowerfoundation.org/?resource_lib=64-bit-elf-v2-abi-specification-power-architecture
43. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-path-format
44. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format
45. https://cwe.mitre.org/
46. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format
47. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
48. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-urls
49. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.0
50. https://gcc.gnu.org/onlinedocs/
51. mailto:gcc-help@gcc.gnu.org
52. mailto:gcc@gcc.gnu.org
53. https://gcc.gnu.org/lists.html
54. https://www.fsf.org/
55. https://gcc.gnu.org/about.html
56. http://validator.w3.org/check/referer
======================================================================
http://gcc.gnu.org/gcc-9/index.html
GCC 9 Release Series
Mar 12, 2020
The [1]GNU project and the GCC developers are pleased to announce the
release of GCC 9.3.
This release is a bug-fix release, containing fixes for regressions in
GCC 9.2 relative to previous releases of GCC.
Release History
GCC 9.3
Mar 12, 2020 ([2]changes, [3]documentation)
GCC 9.2
Aug 12, 2019 ([4]changes, [5]documentation)
GCC 9.1
May 3, 2019 ([6]changes, [7]documentation)
References and Acknowledgements
GCC used to stand for the GNU C Compiler, but since the compiler
supports several other languages aside from C, it now stands for the
GNU Compiler Collection.
A list of [8]successful builds is updated as new information becomes
available.
The GCC developers would like to thank the numerous people that have
contributed new features, improvements, bug fixes, and other changes as
well as test results to GCC. This [9]amazing group of volunteers is
what makes GCC successful.
For additional information about GCC please refer to the [10]GCC
project web site or contact the [11]GCC development mailing list.
To obtain GCC please use [12]our mirror sites or [13]our version
control system.
For questions related to the use of GCC, please consult these web
pages and the [14]GCC manuals. If that fails, the
[15]gcc-help@gcc.gnu.org mailing list might help. Comments on these
web pages and the development of GCC are welcome on our developer
list at [16]gcc@gcc.gnu.org. All of [17]our lists have public
archives.
Copyright (C) [18]Free Software Foundation, Inc. Verbatim copying and
distribution of this entire article is permitted in any medium,
provided this notice is preserved.
These pages are [19]maintained by the GCC team. Last modified
2020-03-12[20].
References
1. http://www.gnu.org/
2. http://gcc.gnu.org/gcc-9/changes.html
3. http://gcc.gnu.org/onlinedocs/9.3.0/
4. http://gcc.gnu.org/gcc-9/changes.html
5. http://gcc.gnu.org/onlinedocs/9.2.0/
6. http://gcc.gnu.org/gcc-9/changes.html
7. http://gcc.gnu.org/onlinedocs/9.1.0/
8. http://gcc.gnu.org/gcc-9/buildstat.html
9. http://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Contributors.html
10. http://gcc.gnu.org/index.html
11. mailto:gcc@gcc.gnu.org
12. http://gcc.gnu.org/mirrors.html
13. http://gcc.gnu.org/git.html
14. https://gcc.gnu.org/onlinedocs/
15. mailto:gcc-help@gcc.gnu.org
16. mailto:gcc@gcc.gnu.org
17. https://gcc.gnu.org/lists.html
18. https://www.fsf.org/
19. https://gcc.gnu.org/about.html
20. http://validator.w3.org/check/referer
======================================================================
http://gcc.gnu.org/gcc-9/changes.html
GCC 9 Release Series
Changes, New Features, and Fixes
This page is a "brief" summary of some of the huge number of
improvements in GCC 9. You may also want to check out our [1]Porting to
GCC 9 page and the [2]full GCC documentation.
Caveats
* On Arm targets (arm*-*-*), [3]a bug in the implementation of the
procedure call standard (AAPCS) in the GCC 6, 7 and 8 releases has
been fixed: a structure containing a bit-field based on a 64-bit
integral type and where no other element in a structure required
64-bit alignment could be passed incorrectly to functions. This is
an ABI change. If the option -Wpsabi is enabled (on by default) the
compiler will emit a diagnostic note for code that might be
affected.
* Support for a number of older systems and recently unmaintained or
untested target ports of GCC has been declared obsolete in GCC 9.
Unless there is activity to revive them, the next release of GCC
will have their sources permanently removed.
The following ports for individual systems on particular
architectures have been obsoleted:
+ Solaris 10 (*-*-solaris2.10). Details can be found in the
[4]announcement.
+ Cell Broadband Engine SPU (spu*-*-*). Details can be found in
the [5]announcement.
* A change to the C++ std::rotate algorithm in GCC 9.1.0 can cause
ABI incompatibilities with object files compiled with other
versions of GCC. If the std::rotate algorithm is called with an
empty range then it might cause a divide-by-zero error (as a SIGFPE
signal) and crash. The change has been reverted for GCC 9.2.0 and
future releases. For more details see [6]Bug 90920. The problem can
be avoided by recompiling any objects that might call std::rotate
with an empty range, so that the GCC 9.1.0 definition of
std::rotate is not used.
* The automatic template instantiation at link time ([7]-frepo) has
been deprecated and will be removed in a future release.
* The --with-default-libstdcxx-abi=gcc4-compatible configure option
is broken in the 9.1 and 9.2 releases, producing a shared library
with missing symbols (see [8]Bug 90361). As a workaround, configure
without that option and build GCC as normal, then edit the
installed <bits/c++config.h> headers to define the
_GLIBCXX_USE_CXX11_ABI macro to 0.
General Improvements
The following GCC command line options have been introduced or
improved.
* All command line options that take a byte-size argument accept
64-bit integers as well as standard SI and IEC suffixes such as kb
and KiB, MB and MiB, or GB and GiB denoting the corresponding
multiples of bytes. See [9]Invoking GCC for more.
* A new option,
[10]-flive-patching=[inline-only-static|inline-clone], has been
introduced to provide a safe compilation for live-patching. At the
same time, provides multiple-level control on the enabled IPA
optimizations. See the user guide for more details about the
option.
* A new option, --completion, has been added to provide more fine
option completion in a shell. It is intended to be used by
Bash-completion.
* GCC's diagnostics now print source code with a left margin showing
line numbers, configurable with
[11]-fno-diagnostics-show-line-numbers.
GCC's diagnostics can also now label regions of the source code to
show pertinent information, such as the types within an expression.
$ g++ t.cc
t.cc: In function 'int test(const shape&, const shape&)':
t.cc:15:4: error: no match for 'operator+' (operand types are 'boxed_value<doubl
e>' and 'boxed_value<double>')
14 | return (width(s1) * height(s1)
| ~~~~~~~~~~~~~~~~~~~~~~
| |
| boxed_value<[...]>
15 | + width(s2) * height(s2));
| ^ ~~~~~~~~~~~~~~~~~~~~~~
| |
| boxed_value<[...]>
These labels can be disabled via [12]-fno-diagnostics-show-labels.
* A new option [13]-fdiagnostics-format=json has been introduced for
emitting diagnostics in a machine-readable format.
* The alignment-related options [14]-falign-functions,
[15]-falign-labels, [16]-falign-loops, and [17]-falign-jumps
received support for a secondary alignment (e.g.
-falign-loops=n:m:n2:m2).
* New pair of profiling options ([18]-fprofile-filter-files and
[19]-fprofile-exclude-files) has been added. The options help to
filter which source files are instrumented.
* AddressSanitizer generates more compact redzones for automatic
variables. That helps to reduce memory footprint of a sanitized
binary.
* Numerous improvements have been made to the output of
[20]-fopt-info.
Messages are now prefixed with optimized, missed, or note, rather
than the old behavior of all being prefixed with note.
The output from -fopt-info can now contain information on inlining
decisions:
$ g++ -c inline.cc -O2 -fopt-info-inline-all
inline.cc:24:11: note: Considering inline candidate void foreach(T, T, void (*)(
E)) [with T = char**; E = char*]/2.
inline.cc:24:11: optimized: Inlining void foreach(T, T, void (*)(E)) [with T =
char**; E = char*]/2 into int main(int, char**)/1.
inline.cc:19:12: missed: not inlinable: void inline_me(char*)/0 -> int std::pu
ts(const char*)/3, function body not available
inline.cc:13:8: optimized: Inlined void inline_me(char*)/4 into int main(int, c
har**)/1 which now has time 127.363637 and size 11, net change of +0.
Unit growth for small function inlining: 16->16 (0%)
Inlined 2 calls, eliminated 1 functions
The output from the vectorizer has been rationalized so that failed
attempts to vectorize a loop are displayed in the form
[LOOP-LOCATION]: couldn't vectorize this loop
[PROBLEM-LOCATION]: because of [REASON]
rather than an exhaustive log of all decisions made by the
vectorizer. For example:
$ gcc -c v.c -O3 -fopt-info-all-vec
v.c:7:3: missed: couldn't vectorize loop
v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__("" : : : "me
mory");
v.c:3:6: note: vectorized 0 loops in function.
v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__("" : : : "me
mory");
The old behavior can be obtained via a new -internals suboption of
-fopt-info.
* A new option, [21]-fsave-optimization-record has been added, which
writes a SRCFILE.opt-record.json.gz file describing the
optimization decisions made by GCC. This is similar to the output
of -fopt-info, but with additional metadata such as the inlining
chain, and profile information (if available).
* Inter-procedural propagation of stack alignment can now be
controlled by [22]-fipa-stack-alignment.
* Propagation of addressability, readonly and writeonly flags on
static variables can now be controlled by
[23]-fipa-reference-addressable.
The following built-in functions have been introduced.
* [24]__builtin_expect_with_probability to provide branch prediction
probability hints to the optimizer.
* [25]__builtin_has_attribute determines whether a function, type, or
variable has been declared with some attribute.
* [26]__builtin_speculation_safe_value can be used to help mitigate
against unsafe speculative execution.
The following attributes have been introduced.
* The [27]copy function attribute has been added. The attribute can
also be applied to type definitions and to variable declarations.
A large number of improvements to code generation have been made,
including but not limited to the following.